| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/display/mediatek/ |
| D | mediatek,gamma.yaml | 4 $id: http://devicetree.org/schemas/display/mediatek/mediatek,gamma.yaml# 7 title: Mediatek display gamma correction 14 Mediatek display gamma correction, namely GAMMA, provides a nonlinear 16 GAMMA device node must be siblings to the central MMSYS_CONFIG node. 25 - mediatek,mt8173-disp-gamma 26 - mediatek,mt8183-disp-gamma 29 - mediatek,mt6795-disp-gamma 30 - const: mediatek,mt8173-disp-gamma 33 - mediatek,mt8186-disp-gamma 34 - mediatek,mt8188-disp-gamma [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/mediatek/ |
| D | mtk_disp_gamma.c | 45 struct mtk_disp_gamma *gamma = dev_get_drvdata(dev); in mtk_gamma_clk_enable() local 47 return clk_prepare_enable(gamma->clk); in mtk_gamma_clk_enable() 52 struct mtk_disp_gamma *gamma = dev_get_drvdata(dev); in mtk_gamma_clk_disable() local 54 clk_disable_unprepare(gamma->clk); in mtk_gamma_clk_disable() 93 struct mtk_disp_gamma *gamma = dev_get_drvdata(dev); in mtk_gamma_set() local 96 if (gamma->data) in mtk_gamma_set() 97 lut_diff = gamma->data->lut_diff; in mtk_gamma_set() 99 mtk_gamma_set_common(gamma->regs, state, lut_diff); in mtk_gamma_set() 106 struct mtk_disp_gamma *gamma = dev_get_drvdata(dev); in mtk_gamma_config() local 108 mtk_ddp_write(cmdq_pkt, h << 16 | w, &gamma->cmdq_reg, gamma->regs, in mtk_gamma_config() [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/fbtft/ |
| D | fbtft-sysfs.c | 55 if (curve_counter == par->gamma.num_curves) { in fbtft_gamma_parse_str() 56 dev_err(par->info->device, "Gamma: Too many curves\n"); in fbtft_gamma_parse_str() 63 if (value_counter == par->gamma.num_values) { in fbtft_gamma_parse_str() 65 "Gamma: Too many values\n"); in fbtft_gamma_parse_str() 73 _count = curve_counter * par->gamma.num_values + in fbtft_gamma_parse_str() 78 if (value_counter != par->gamma.num_values) { in fbtft_gamma_parse_str() 79 dev_err(par->info->device, "Gamma: Too few values\n"); in fbtft_gamma_parse_str() 85 if (curve_counter != par->gamma.num_curves) { in fbtft_gamma_parse_str() 86 dev_err(par->info->device, "Gamma: Too few curves\n"); in fbtft_gamma_parse_str() 102 mutex_lock(&par->gamma.lock); in sprintf_gamma() [all …]
|
| D | fbtft.h | 55 * @set_gamma: Set Gamma curve (optional) 99 * @gamma: String representation of Gamma curve(s) 100 * @gamma_num: Number of Gamma curves 101 * @gamma_len: Number of values per Gamma curve 117 char *gamma; member 132 * @gamma: String representation of Gamma curve(s) 142 char *gamma; member 180 * @gamma.lock: Mutex for Gamma curve locking 181 * @gamma.curves: Pointer to Gamma curve array 182 * @gamma.num_values: Number of values per Gamma curve [all …]
|
| D | fb_st7789v.c | 40 * @PVGAMCTRL: positive voltage gamma control 41 * @NVGAMCTRL: negative voltage gamma control 183 * set_gamma() - set gamma curves 186 * @curves: gamma curves 188 * Before the gamma curves are applied, they are preprocessed with a bitmask 191 * function and that illegal gamma values are auto-corrected and not 203 * Bitmasks for gamma curve command parameters. in set_gamma() 205 * gamma curves. in set_gamma() 224 for (i = 0; i < par->gamma.num_curves; i++) { in set_gamma() 225 c = i * par->gamma.num_values; in set_gamma() [all …]
|
| /kernel/linux/linux-6.6/drivers/staging/fbtft/ |
| D | fbtft-sysfs.c | 55 if (curve_counter == par->gamma.num_curves) { in fbtft_gamma_parse_str() 56 dev_err(par->info->device, "Gamma: Too many curves\n"); in fbtft_gamma_parse_str() 63 if (value_counter == par->gamma.num_values) { in fbtft_gamma_parse_str() 65 "Gamma: Too many values\n"); in fbtft_gamma_parse_str() 73 _count = curve_counter * par->gamma.num_values + in fbtft_gamma_parse_str() 78 if (value_counter != par->gamma.num_values) { in fbtft_gamma_parse_str() 79 dev_err(par->info->device, "Gamma: Too few values\n"); in fbtft_gamma_parse_str() 85 if (curve_counter != par->gamma.num_curves) { in fbtft_gamma_parse_str() 86 dev_err(par->info->device, "Gamma: Too few curves\n"); in fbtft_gamma_parse_str() 102 mutex_lock(&par->gamma.lock); in sprintf_gamma() [all …]
|
| D | fbtft.h | 55 * @set_gamma: Set Gamma curve (optional) 99 * @gamma: String representation of Gamma curve(s) 100 * @gamma_num: Number of Gamma curves 101 * @gamma_len: Number of values per Gamma curve 117 char *gamma; member 132 * @gamma: String representation of Gamma curve(s) 142 char *gamma; member 180 * @gamma.lock: Mutex for Gamma curve locking 181 * @gamma.curves: Pointer to Gamma curve array 182 * @gamma.num_values: Number of values per Gamma curve [all …]
|
| /kernel/linux/linux-6.6/drivers/staging/media/atomisp/pci/isp/kernels/gc/gc_1.0/ |
| D | ia_css_gc_types.h | 20 * CSS-API header file for Gamma Correction parameters. 25 /* Fractional bits for GAMMA gain */ 28 /* Number of elements in the gamma table. */ 32 /* Number of elements in the gamma table. */ 36 /* Gamma table, used for Y(Luma) Gamma Correction. 38 * ISP block: GC1 (YUV Gamma Correction) 40 * (ISP2: GC2(sRGB Gamma Correction) is used.) 46 /** Y(Luma) Gamma table on vamem type 1. u0.8, [0,255] */ 48 /** Y(Luma) Gamma table on vamem type 2. u0.8, [0,255] */ 56 /* Gamma Correction configuration (used only for YUV Gamma Correction). [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/media/atomisp/pci/isp/kernels/gc/gc_1.0/ |
| D | ia_css_gc_types.h | 20 * CSS-API header file for Gamma Correction parameters. 25 /* Fractional bits for GAMMA gain */ 28 /* Number of elements in the gamma table. */ 32 /* Number of elements in the gamma table. */ 36 /* Gamma table, used for Y(Luma) Gamma Correction. 38 * ISP block: GC1 (YUV Gamma Correction) 40 * (ISP2: GC2(sRGB Gamma Correction) is used.) 46 /** Y(Luma) Gamma table on vamem type 1. u0.8, [0,255] */ 48 /** Y(Luma) Gamma table on vamem type 2. u0.8, [0,255] */ 56 /* Gamma Correction configuration (used only for YUV Gamma Correction). [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/amd/display/amdgpu_dm/ |
| D | amdgpu_dm_color.c | 36 * - Input gamma LUT (de-normalized) 49 * The input gamma LUT block isn't really applicable here since it operates 127 struct dc_gamma *gamma, bool is_legacy) in __drm_lut_to_dc_gamma() argument 138 gamma->entries.red[i] = dc_fixpt_from_int(r); in __drm_lut_to_dc_gamma() 139 gamma->entries.green[i] = dc_fixpt_from_int(g); in __drm_lut_to_dc_gamma() 140 gamma->entries.blue[i] = dc_fixpt_from_int(b); in __drm_lut_to_dc_gamma() 151 gamma->entries.red[i] = dc_fixpt_from_fraction(r, MAX_DRM_LUT_VALUE); in __drm_lut_to_dc_gamma() 152 gamma->entries.green[i] = dc_fixpt_from_fraction(g, MAX_DRM_LUT_VALUE); in __drm_lut_to_dc_gamma() 153 gamma->entries.blue[i] = dc_fixpt_from_fraction(b, MAX_DRM_LUT_VALUE); in __drm_lut_to_dc_gamma() 197 struct dc_gamma *gamma = NULL; in __set_legacy_tf() local [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/amd/display/amdgpu_dm/ |
| D | amdgpu_dm_color.c | 38 * - Input gamma LUT (de-normalized) 51 * The input gamma LUT block isn't really applicable here since it operates 139 * @gamma: DC gamma to set entries 140 * @is_legacy: legacy or atomic gamma 145 struct dc_gamma *gamma, bool is_legacy) in __drm_lut_to_dc_gamma() argument 156 gamma->entries.red[i] = dc_fixpt_from_int(r); in __drm_lut_to_dc_gamma() 157 gamma->entries.green[i] = dc_fixpt_from_int(g); in __drm_lut_to_dc_gamma() 158 gamma->entries.blue[i] = dc_fixpt_from_int(b); in __drm_lut_to_dc_gamma() 169 gamma->entries.red[i] = dc_fixpt_from_fraction(r, MAX_DRM_LUT_VALUE); in __drm_lut_to_dc_gamma() 170 gamma->entries.green[i] = dc_fixpt_from_fraction(g, MAX_DRM_LUT_VALUE); in __drm_lut_to_dc_gamma() [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/media/atomisp/pci/isp/kernels/gc/gc_2/ |
| D | ia_css_gc2_types.h | 22 * CSS-API header file for Gamma Correction parameters. 25 /* sRGB Gamma table, used for sRGB Gamma Correction. 27 * ISP block: GC2 (sRGB Gamma Correction) 28 * (ISP1: GC1(YUV Gamma Correction) is used.) 32 /* Number of elements in the sRGB gamma table. */ 36 /* Number of elements in the sRGB gamma table. */ 44 /** RGB Gamma table on vamem type1. This table is not used, 45 because sRGB Gamma Correction is not implemented for ISP2300. */ 47 /** RGB Gamma table on vamem type2. u0.12, [0,4095] */
|
| /kernel/linux/linux-6.6/drivers/staging/media/atomisp/pci/isp/kernels/gc/gc_2/ |
| D | ia_css_gc2_types.h | 22 * CSS-API header file for Gamma Correction parameters. 25 /* sRGB Gamma table, used for sRGB Gamma Correction. 27 * ISP block: GC2 (sRGB Gamma Correction) 28 * (ISP1: GC1(YUV Gamma Correction) is used.) 32 /* Number of elements in the sRGB gamma table. */ 36 /* Number of elements in the sRGB gamma table. */ 44 /** RGB Gamma table on vamem type1. This table is not used, 45 because sRGB Gamma Correction is not implemented for ISP2300. */ 47 /** RGB Gamma table on vamem type2. u0.12, [0,4095] */
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/amd/display/modules/color/ |
| D | color_gamma.h | 45 unsigned int gammaFromEdid :1; //gamma from edid is in use 46 unsigned int gammaFromEdidEx :1; //gamma from edid is in use , but only for Display Id 1.2 47 unsigned int gammaFromUser :1; //user custom gamma is used 51 unsigned int gammaPredefinedSRGB :1; //flag for SRGB gamma 52 unsigned int gammaPredefinedPQ :1; //flag for PQ gamma 53 unsigned int gammaPredefinedPQ2084Interim :1; //flag for PQ gamma, lower max nits 54 unsigned int gammaPredefined36 :1; //flag for 3.6 gamma 55 unsigned int gammaPredefinedReset :1; //flag to return to previous gamma 60 unsigned short gamma[256*3]; // gamma ramp packed in same way as OS windows ,r , g & b member 64 int gamma[3]; member [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/amd/display/modules/color/ |
| D | color_gamma.h | 45 unsigned int gammaFromEdid :1; //gamma from edid is in use 46 unsigned int gammaFromEdidEx :1; //gamma from edid is in use , but only for Display Id 1.2 47 unsigned int gammaFromUser :1; //user custom gamma is used 51 unsigned int gammaPredefinedSRGB :1; //flag for SRGB gamma 52 unsigned int gammaPredefinedPQ :1; //flag for PQ gamma 53 unsigned int gammaPredefinedPQ2084Interim :1; //flag for PQ gamma, lower max nits 54 unsigned int gammaPredefined36 :1; //flag for 3.6 gamma 55 unsigned int gammaPredefinedReset :1; //flag to return to previous gamma 60 unsigned short gamma[256*3]; // gamma ramp packed in same way as OS windows ,r , g & b member 64 int gamma[3]; member [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/ |
| D | drm_color_mgmt.c | 50 * linear/pass-thru gamma table should be used. This is generally the 59 * split-gamma modes) appropriately. 64 * lookup through the gamma LUT. The data is interpreted as a struct 73 * Blob property to set the gamma lookup table (LUT) mapping pixel data 81 * linear/pass-thru gamma table should be used. This is generally the 93 * largest size, and sub-sample smaller sized LUTs (e.g. for split-gamma 96 * There is also support for a legacy gamma table, which is set up by calling 97 * drm_mode_crtc_set_gamma_size(). The DRM core will then alias the legacy gamma 154 * @gamma_lut_size: the size of the gamma lut (after CSC) 157 * properties on a CRTC. This includes 3 degamma, csc and gamma [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/ |
| D | drm_color_mgmt.c | 49 * linear/pass-thru gamma table should be used. This is generally the 58 * split-gamma modes) appropriately. 63 * lookup through the gamma LUT. The data is interpreted as a struct 72 * Blob property to set the gamma lookup table (LUT) mapping pixel data 80 * linear/pass-thru gamma table should be used. This is generally the 88 * largest size, and sub-sample smaller sized LUTs (e.g. for split-gamma 91 * There is also support for a legacy gamma table, which is set up by calling 93 * drm_atomic_helper_legacy_gamma_set() to alias the legacy gamma ramp with the 150 * @gamma_lut_size: the size of the gamma lut (after CSC) 153 * properties on a CRTC. This includes 3 degamma, csc and gamma [all …]
|
| /kernel/linux/linux-6.6/drivers/video/fbdev/via/ |
| D | via_utility.c | 115 /* Gamma Function Implementation*/ 130 /* 8 bpp mode can't adjust gamma */ in viafb_set_gamma_table() 134 /* Enable Gamma */ in viafb_set_gamma_table() 154 /* Fill IGA1 Gamma Table */ in viafb_set_gamma_table() 162 /* If adjust Gamma value in SAMM, fill IGA1, in viafb_set_gamma_table() 163 IGA2 Gamma table simultaneous. */ in viafb_set_gamma_table() 164 /* Switch to IGA2 Gamma Table */ in viafb_set_gamma_table() 172 /* Fill IGA2 Gamma Table */ in viafb_set_gamma_table() 189 /* Enable Gamma */ in viafb_get_gamma_table() 209 /* Reading gamma table to get color value */ in viafb_get_gamma_table()
|
| /kernel/linux/linux-5.10/drivers/video/fbdev/via/ |
| D | via_utility.c | 115 /* Gamma Function Implementation*/ 130 /* 8 bpp mode can't adjust gamma */ in viafb_set_gamma_table() 134 /* Enable Gamma */ in viafb_set_gamma_table() 154 /* Fill IGA1 Gamma Table */ in viafb_set_gamma_table() 162 /* If adjust Gamma value in SAMM, fill IGA1, in viafb_set_gamma_table() 163 IGA2 Gamma table simultaneous. */ in viafb_set_gamma_table() 164 /* Switch to IGA2 Gamma Table */ in viafb_set_gamma_table() 172 /* Fill IGA2 Gamma Table */ in viafb_set_gamma_table() 189 /* Enable Gamma */ in viafb_get_gamma_table() 209 /* Reading gamma table to get color value */ in viafb_get_gamma_table()
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/amd/display/dc/core/ |
| D | dc_surface.c | 193 void dc_gamma_retain(struct dc_gamma *gamma) in dc_gamma_retain() argument 195 kref_get(&gamma->refcount); in dc_gamma_retain() 200 struct dc_gamma *gamma = container_of(kref, struct dc_gamma, refcount); in dc_gamma_free() local 201 kvfree(gamma); in dc_gamma_free() 204 void dc_gamma_release(struct dc_gamma **gamma) in dc_gamma_release() argument 206 kref_put(&(*gamma)->refcount, dc_gamma_free); in dc_gamma_release() 207 *gamma = NULL; in dc_gamma_release() 212 struct dc_gamma *gamma = kvzalloc(sizeof(*gamma), GFP_KERNEL); in dc_create_gamma() local 214 if (gamma == NULL) in dc_create_gamma() 217 kref_init(&gamma->refcount); in dc_create_gamma() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/amd/display/dc/core/ |
| D | dc_surface.c | 193 void dc_gamma_retain(struct dc_gamma *gamma) in dc_gamma_retain() argument 195 kref_get(&gamma->refcount); in dc_gamma_retain() 200 struct dc_gamma *gamma = container_of(kref, struct dc_gamma, refcount); in dc_gamma_free() local 201 kvfree(gamma); in dc_gamma_free() 204 void dc_gamma_release(struct dc_gamma **gamma) in dc_gamma_release() argument 206 kref_put(&(*gamma)->refcount, dc_gamma_free); in dc_gamma_release() 207 *gamma = NULL; in dc_gamma_release() 212 struct dc_gamma *gamma = kvzalloc(sizeof(*gamma), GFP_KERNEL); in dc_create_gamma() local 214 if (gamma == NULL) in dc_create_gamma() 217 kref_init(&gamma->refcount); in dc_create_gamma() [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/i915/display/ |
| D | intel_sprite.c | 50 static void i9xx_plane_linear_gamma(u16 gamma[8]) in i9xx_plane_linear_gamma() 57 gamma[i] = (in[i] << 8) / 32; in i9xx_plane_linear_gamma() 343 u16 gamma[8]; in vlv_sprite_update_gamma() local 346 /* Seems RGB data bypasses the gamma always */ in vlv_sprite_update_gamma() 350 i9xx_plane_linear_gamma(gamma); in vlv_sprite_update_gamma() 356 gamma[i] << 16 | gamma[i] << 8 | gamma[i]); in vlv_sprite_update_gamma() 721 u16 gamma[18]) in ivb_sprite_linear_gamma() 729 * brought up to full amplitude by using sprite internal gamma in ivb_sprite_linear_gamma() 730 * correction, pipe gamma correction, or pipe color space in ivb_sprite_linear_gamma() 736 gamma[i] = min((scale * i << 10) / 16, (1 << 10) - 1); in ivb_sprite_linear_gamma() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/panel/ |
| D | panel-tpo-td043mtea1.c | 61 u16 gamma[12]; member 101 const u16 *gamma = lcd->gamma; in td043mtea1_write_gamma() local 105 /* gamma bits [9:8] */ in td043mtea1_write_gamma() 107 val |= (gamma[i] & 0x300) >> ((i + 1) * 2); in td043mtea1_write_gamma() 111 val |= (gamma[i + 4] & 0x300) >> ((i + 1) * 2); in td043mtea1_write_gamma() 115 val |= (gamma[i + 8] & 0x300) >> ((i + 1) * 2); in td043mtea1_write_gamma() 118 /* gamma bits [7:0] */ in td043mtea1_write_gamma() 120 td043mtea1_write(lcd, 0x14 + i, gamma[i] & 0xff); in td043mtea1_write_gamma() 247 for (i = 0; i < ARRAY_SIZE(lcd->gamma); i++) { in gamma_show() 249 lcd->gamma[i]); in gamma_show() [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/panel/ |
| D | panel-tpo-td043mtea1.c | 61 u16 gamma[12]; member 101 const u16 *gamma = lcd->gamma; in td043mtea1_write_gamma() local 105 /* gamma bits [9:8] */ in td043mtea1_write_gamma() 107 val |= (gamma[i] & 0x300) >> ((i + 1) * 2); in td043mtea1_write_gamma() 111 val |= (gamma[i + 4] & 0x300) >> ((i + 1) * 2); in td043mtea1_write_gamma() 115 val |= (gamma[i + 8] & 0x300) >> ((i + 1) * 2); in td043mtea1_write_gamma() 118 /* gamma bits [7:0] */ in td043mtea1_write_gamma() 120 td043mtea1_write(lcd, 0x14 + i, gamma[i] & 0xff); in td043mtea1_write_gamma() 247 for (i = 0; i < ARRAY_SIZE(lcd->gamma); i++) { in gamma_show() 249 lcd->gamma[i]); in gamma_show() [all …]
|
| /kernel/linux/linux-6.6/drivers/video/fbdev/omap2/omapfb/displays/ |
| D | panel-tpo-td043mtea1.c | 61 u16 gamma[12]; member 116 static void tpo_td043_write_gamma(struct spi_device *spi, u16 gamma[12]) in tpo_td043_write_gamma() 120 /* gamma bits [9:8] */ in tpo_td043_write_gamma() 122 val |= (gamma[i] & 0x300) >> ((i + 1) * 2); in tpo_td043_write_gamma() 126 val |= (gamma[i+4] & 0x300) >> ((i + 1) * 2); in tpo_td043_write_gamma() 130 val |= (gamma[i+8] & 0x300) >> ((i + 1) * 2); in tpo_td043_write_gamma() 133 /* gamma bits [7:0] */ in tpo_td043_write_gamma() 135 tpo_td043_write(spi, 0x14 + i, gamma[i] & 0xff); in tpo_td043_write_gamma() 231 for (i = 0; i < ARRAY_SIZE(ddata->gamma); i++) { in tpo_td043_gamma_show() 233 ddata->gamma[i]); in tpo_td043_gamma_show() [all …]
|