display: add getter/setter function for white balance 92/284292/1 accepted/tizen/7.0/unified/20221117.014348
authorYunhee Seo <yuni.seo@samsung.com>
Thu, 10 Nov 2022 08:12:45 +0000 (17:12 +0900)
committeryunhee seo <yuni.seo@samsung.com>
Tue, 15 Nov 2022 04:53:12 +0000 (04:53 +0000)
commit4a2150733c3c9be28a2d67b8fe728502342c4d16
treea100bbb005651d242362fac045247bbb778562ff
parent174e6df84e778f4cecc7941c1023223ee1a2ebf2
display: add getter/setter function for white balance

Add a dbus/plugin getter and setter function of display white balance which controls RGB gain and offset.

White balancing is adjusting standard point of white color, this because the light source is different for each device.
gain value is a value to be multiplied for RGB value calculation.
offset value is a value to be added for RGB value calculation.

white balancing getter/setter dbus methods
1. Set white balance
    path: /Org/Tizen/System/DeviceD/Display
    interface: org.tizen.system.deviced.display
    member: SetWhiteBalance
    parameter: "(ii)", white balance enum type to be set, value to be set
    return: "(i)", 0 on success, negative on error.

2. Get white balance
    path: /Org/Tizen/System/DeviceD/Display
    interface: org.tizen.system.deviced.display
    member: GetWhiteBalance
    parameter: "(i)", white balance enum type to be get
    return: "(i)", value for that white balance type, negative on error.

plugin implementation is referring to this enum type
enum hal_display_white_balance {
HAL_DISPLAY_WHITE_BALANCE_R_GAIN,
HAL_DISPLAY_WHITE_BALANCE_G_GAIN,
HAL_DISPLAY_WHITE_BALANCE_B_GAIN,
HAL_DISPLAY_WHITE_BALANCE_R_OFFSET,
HAL_DISPLAY_WHITE_BALANCE_G_OFFSET,
HAL_DISPLAY_WHITE_BALANCE_B_OFFSET,
};

Change-Id: I972bdb468806b442b221634a166645764c7c2ec9
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
(cherry picked from commit 0b807395978a911334d6204ba383d5ea5a244f5d)
plugins/iot-headed/display/core.c
plugins/iot-headed/display/device-interface.c
plugins/mobile/display/core.c
plugins/mobile/display/device-interface.c
plugins/tv/display/core.c
plugins/tv/display/device-interface.c
plugins/wearable/display/core.c
plugins/wearable/display/device-interface.c
src/display/device-interface.h
src/display/display-dbus.c