drm/i915: Clean up cherryview_load_luts()
Subsystems (2)
PATCH 1/1 drm/i915: Clean up cherryview_load_luts()
From: Ville Syrjälä <[email protected]>
I like my functions simple, so split up the low level bits from cherryview_load_luts() into separate functions. Also rename the whole thing to chv_load_luts() to match the new world order.
--- drivers/gpu/drm/i915/intel_color.c | 98 ++++++++++++++++++------------ 1 file changed, 60 insertions(+), 38 deletions(-)
drivers/gpu/drm/i915/intel_color.c +60 -38
@@ -784,13 +784,65 @@ static void icl_load_luts(const struct intel_crtc_state *crtc_state) } } -static void cherryview_load_luts (const struct intel_crtc_state *crtc_state) +static u32 chv_cgm_degamma_ldw (const struct drm_color_lut *color) +{ +return drm_color_lut_extract (color->green,14 ) <<16 | +drm_color_lut_extract (color->blue,14 ); +} + +static u32 chv_cgm_degamma_udw (const struct drm_color_lut *color) +{ +return drm_color_lut_extract (color->red,14 ); +} + +static void chv_load_cgm_degamma (struct intel_crtc *crtc, +const struct drm_property_blob *blob) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +const struct drm_color_lut *lut = blob->data; +int i, lut_size =drm_color_lut_size (blob); +enum pipe pipe = crtc->pipe; + +for (i =0 ; i < lut_size; i++) { +I915_WRITE (CGM_PIPE_DEGAMMA (pipe, i,0 ), +chv_cgm_degamma_ldw (&lut[i])); +I915_WRITE (CGM_PIPE_DEGAMMA (pipe, i,1 ), +chv_cgm_degamma_udw (&lut[i])); + } +} + +static u32 chv_cgm_gamma_ldw (const struct drm_color_lut *color) +{ +return drm_color_lut_extract (color->green,10 ) <<16 | +drm_color_lut_extract (color->blue,10 ); +} + +static u32 chv_cgm_gamma_udw (const struct drm_color_lut *color) +{ +return drm_color_lut_extract (color->red,10 ); +} + +static void chv_load_cgm_gamma (struct intel_crtc *crtc, +const struct drm_property_blob *blob) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +const struct drm_color_lut *lut = blob->data; +int i, lut_size =drm_color_lut_size (blob); +enum pipe pipe = crtc->pipe; + +for (i =0 ; i < lut_size; i++) { +I915_WRITE (CGM_PIPE_GAMMA (pipe, i,0 ), +chv_cgm_gamma_ldw (&lut[i])); +I915_WRITE (CGM_PIPE_GAMMA (pipe, i,1 ), +chv_cgm_gamma_udw (&lut[i])); + } +} + +static void chv_load_luts (const struct intel_crtc_state *crtc_state) {struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);const struct drm_property_blob *gamma_lut = crtc_state->base.gamma_lut;const struct drm_property_blob *degamma_lut = crtc_state->base.degamma_lut; -enum pipe pipe = crtc->pipe;cherryview_load_csc_matrix (crtc_state);
@@ -799,41 +851,11 @@ static void cherryview_load_luts(const struct intel_crtc_state *crtc_state)return ; } -if (degamma_lut) { -const struct drm_color_lut *lut = degamma_lut->data; -int i, lut_size =INTEL_INFO (dev_priv)->color.degamma_lut_size; +if (degamma_lut) +chv_load_cgm_degamma (crtc, degamma_lut); -for (i =0 ; i < lut_size; i++) { -u32 word0, word1; - -/* Write LUT in U0.14 format. */ - word0 = - (drm_color_lut_extract (lut[i].green,14 ) <<16 ) | -drm_color_lut_extract (lut[i].blue,14 ); - word1 =drm_color_lut_extract (lut[i].red,14 ); - -I915_WRITE (CGM_PIPE_DEGAMMA (pipe, i,0 ), word0); -I915_WRITE (CGM_PIPE_DEGAMMA (pipe, i,1 ), word1); - } - } - -if (gamma_lut) { -const struct drm_color_lut *lut = gamma_lut->data; -int i, lut_size =INTEL_INFO (dev_priv)->color.gamma_lut_size; - -for (i =0 ; i < lut_size; i++) { -u32 word0, word1; - -/* Write LUT in U0.10 format. */ - word0 = - (drm_color_lut_extract (lut[i].green,10 ) <<16 ) | -drm_color_lut_extract (lut[i].blue,10 ); - word1 =drm_color_lut_extract (lut[i].red,10 ); - -I915_WRITE (CGM_PIPE_GAMMA (pipe, i,0 ), word0); -I915_WRITE (CGM_PIPE_GAMMA (pipe, i,1 ), word1); - } - } +if (gamma_lut) +chv_load_cgm_gamma (crtc, gamma_lut); }void intel_color_load_luts (const struct intel_crtc_state *crtc_state)
@@ -1232,7 +1254,7 @@ void intel_color_init(struct intel_crtc *crtc)if (IS_CHERRYVIEW (dev_priv)) { dev_priv->display.color_check = chv_color_check; dev_priv->display.color_commit = i9xx_color_commit; - dev_priv->display.load_luts = cherryview_load_luts; + dev_priv->display.load_luts = chv_load_luts; }else if (INTEL_GEN (dev_priv) >=4 ) { dev_priv->display.color_check = i9xx_color_check; dev_priv->display.color_commit = i9xx_color_commit;
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Clean up cherryview_load_luts()
== Series Details ==
== Series Details ==
Series: drm/i915: Clean up cherryview_load_luts()
URL : https://patchwork.freedesktop.org/series/59169/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_5888 -> Patchwork_12726
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_12726 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_12726, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/59169/revisions/1/mbox/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_12726:
### IGT changes ###
#### Possible regressions ####
* igt@kms_pipe_crc_basic@read-crc-pipe-a:
- fi-glk-dsi: PASS -> FAIL
Known issues
------------
Here are the changes found in Patchwork_12726 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_contexts:
- fi-bdw-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ]
- fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ]
* igt@i915_selftest@live_uncore:
- fi-ivb-3770: PASS -> DMESG-FAIL [fdo#110210]
* igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362]
#### Warnings ####
* igt@i915_pm_rpm@module-reload:
- fi-glk-dsi: DMESG-WARN [fdo#105538] / [fdo#107732] / [fdo#109513] -> DMESG-FAIL [fdo#105538] / [fdo#107732] / [fdo#109513]
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#105538]: https://bugs.freedesktop.org/show_bug.cgi?id=105538
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107732]: https://bugs.freedesktop.org/show_bug.cgi?id=107732
[fdo#109513]: https://bugs.freedesktop.org/show_bug.cgi?id=109513
[fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210
[fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235
Participating hosts (50 -> 45)
------------------------------
Missing (5): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_5888 -> Patchwork_12726
CI_DRM_5888: 381350f19ba1844d34105890169b1f1443f45879 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4932: 08cf63a8fac11e3594b57580331fb319241a0d69 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12726: fcb1eddbc467e3064669a0a369cc629d6d713abb @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
fcb1eddbc467 drm/i915: Clean up cherryview_load_luts()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12726/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Clean up cherryview_load_luts() (rev2)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Clean up cherryview_load_luts() (rev2)
URL : https://patchwork.freedesktop.org/series/59169/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5999 -> Patchwork_12874
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/59169/revisions/2/mbox/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_12874:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@gem_exec_basic@gtt-vebox:
- {fi-cml-u}: NOTRUN -> [SKIP][1] +58 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/fi-cml-u/igt@[email protected]
* igt@kms_chamelium@common-hpd-after-suspend:
- {fi-icl-u2}: [PASS][2] -> [FAIL][3]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/fi-icl-u2/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/fi-icl-u2/igt@[email protected]
* igt@kms_chamelium@dp-edid-read:
- {fi-icl-u2}: [SKIP][4] ([fdo#109316]) -> [FAIL][5] +2 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/fi-icl-u2/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/fi-icl-u2/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109316]: https://bugs.freedesktop.org/show_bug.cgi?id=109316
Participating hosts (41 -> 36)
------------------------------
Additional (7): fi-snb-2520m fi-kbl-guc fi-icl-u3 fi-icl-y fi-blb-e6850 fi-bsw-kefka fi-cml-u
Missing (12): fi-ilk-m540 fi-bxt-dsi fi-skl-guc fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-hsw-4770 fi-skl-iommu fi-bdw-samus fi-byt-clapper fi-skl-6700k2 fi-kbl-r
Build changes
-------------
* Linux: CI_DRM_5999 -> Patchwork_12874
CI_DRM_5999: bde6790dd103ba3c4c127bbc061b90ea3f406762 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4964: ffe44144a2285788ae07768a9240b27ea8182d5c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12874: 4aa8afbb1ecc0b65993dd29f5dce87f4aa4e5a98 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
4aa8afbb1ecc drm/i915: Clean up cherryview_load_luts()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915: Clean up cherryview_load_luts() (rev2)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Clean up cherryview_load_luts() (rev2)
URL : https://patchwork.freedesktop.org/series/59169/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5999_full -> Patchwork_12874_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_12874_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@bcs0-s3:
- shard-skl: [PASS][1] -> [INCOMPLETE][2] ([fdo#104108] / [fdo#107773])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-skl7/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-skl7/igt@[email protected]
* igt@i915_pm_rpm@fences:
- shard-skl: [PASS][3] -> [INCOMPLETE][4] ([fdo#107807])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-skl5/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-skl4/igt@[email protected]
* igt@i915_selftest@live_hangcheck:
- shard-iclb: [PASS][5] -> [INCOMPLETE][6] ([fdo#107713] / [fdo#108569])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-iclb7/igt@i915_selftest@live_hangcheck.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-iclb6/igt@i915_selftest@live_hangcheck.html
* igt@kms_color@pipe-a-ctm-green-to-red:
- shard-skl: [PASS][7] -> [FAIL][8] ([fdo#107201])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-skl5/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-skl4/igt@[email protected]
* igt@kms_cursor_crc@cursor-256x256-suspend:
- shard-skl: [PASS][9] -> [INCOMPLETE][10] ([fdo#104108])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-skl2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-skl5/igt@[email protected]
* igt@kms_flip@plain-flip-ts-check:
- shard-glk: [PASS][11] -> [FAIL][12] ([fdo#100368])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-glk7/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-glk8/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-snb: [PASS][13] -> [DMESG-WARN][14] ([fdo#102365])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-snb7/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-snb1/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: [PASS][15] -> [FAIL][16] ([fdo#103167]) +5 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt:
- shard-iclb: [PASS][17] -> [INCOMPLETE][18] ([fdo#106978] / [fdo#107713])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-iclb4/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-iclb1/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt.html
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
- shard-kbl: [PASS][19] -> [DMESG-WARN][20] ([fdo#108566]) +2 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-kbl3/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-kbl5/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-apl: [PASS][21] -> [DMESG-WARN][22] ([fdo#108566]) +2 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-apl3/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-apl3/igt@[email protected]
* igt@kms_plane_scaling@pipe-b-scaler-with-clipping-clamping:
- shard-glk: [PASS][23] -> [SKIP][24] ([fdo#109271] / [fdo#109278])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-glk9/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-glk6/igt@[email protected]
* igt@kms_psr@psr2_primary_mmap_gtt:
- shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109441]) +1 similar issue
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-iclb2/igt@kms_psr@psr2_primary_mmap_gtt.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-iclb5/igt@kms_psr@psr2_primary_mmap_gtt.html
* igt@perf_pmu@rc6-runtime-pm-long:
- shard-iclb: [PASS][27] -> [FAIL][28] ([fdo#105010])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-iclb1/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-iclb8/igt@[email protected]
#### Possible fixes ####
* igt@gem_tiled_swapping@non-threaded:
- shard-apl: [DMESG-WARN][29] ([fdo#108686]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-apl1/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-apl2/igt@[email protected]
* igt@i915_pm_rpm@i2c:
- shard-iclb: [DMESG-WARN][31] ([fdo#109982]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-iclb2/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-iclb5/igt@[email protected]
* igt@i915_suspend@debugfs-reader:
- shard-apl: [DMESG-WARN][33] ([fdo#108566]) -> [PASS][34] +4 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-apl4/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-apl3/igt@[email protected]
* igt@kms_cursor_crc@cursor-size-change:
- shard-apl: [FAIL][35] ([fdo#103232]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-apl8/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-apl4/igt@[email protected]
* igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic:
- shard-glk: [FAIL][37] ([fdo#106509] / [fdo#107409]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-glk5/igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-glk2/igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-kbl: [DMESG-WARN][39] ([fdo#108566]) -> [PASS][40] +3 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-kbl6/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-kbl4/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite:
- shard-iclb: [FAIL][41] ([fdo#103167]) -> [PASS][42] +7 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-iclb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html
* igt@kms_psr@psr2_basic:
- shard-iclb: [SKIP][43] ([fdo#109441]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-iclb6/igt@kms_psr@psr2_basic.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-iclb2/igt@kms_psr@psr2_basic.html
* igt@kms_sysfs_edid_timing:
- shard-iclb: [FAIL][45] ([fdo#100047]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5999/shard-iclb3/igt@kms_sysfs_edid_timing.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/shard-iclb4/igt@kms_sysfs_edid_timing.html
[fdo#100047]: https://bugs.freedesktop.org/show_bug.cgi?id=100047
[fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
[fdo#102365]: https://bugs.freedesktop.org/show_bug.cgi?id=102365
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
[fdo#106509]: https://bugs.freedesktop.org/show_bug.cgi?id=106509
[fdo#106978]: https://bugs.freedesktop.org/show_bug.cgi?id=106978
[fdo#107201]: https://bugs.freedesktop.org/show_bug.cgi?id=107201
[fdo#107409]: https://bugs.freedesktop.org/show_bug.cgi?id=107409
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107773]: https://bugs.freedesktop.org/show_bug.cgi?id=107773
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109982]: https://bugs.freedesktop.org/show_bug.cgi?id=109982
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_5999 -> Patchwork_12874
CI_DRM_5999: bde6790dd103ba3c4c127bbc061b90ea3f406762 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4964: ffe44144a2285788ae07768a9240b27ea8182d5c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12874: 4aa8afbb1ecc0b65993dd29f5dce87f4aa4e5a98 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12874/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Thanks and Regards,
Swati
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Ville Syrjala
Sent: Monday, April 8, 2019 5:48 PM
To: [email protected]
Subject: [Intel-gfx] [PATCH] drm/i915: Clean up cherryview_load_luts()
From: Ville Syrjälä <[email protected]>
I like my functions simple, so split up the low level bits fromcherryview_load_luts() into separate functions. Also rename the whole thing to chv_load_luts() to match the new world order.
--- drivers/gpu/drm/i915/intel_color.c | 98 ++++++++++++++++++------------ 1 file changed, 60 insertions(+), 38 deletions(-)
drivers/gpu/drm/i915/intel_color.c +49 -37
@@ -784,13 +784,65 @@ static void icl_load_luts(const struct intel_crtc_state *crtc_state) } } -static void cherryview_load_luts (const struct intel_crtc_state *crtc_state) +static u32 chv_cgm_degamma_ldw (const struct drm_color_lut *color) { +return drm_color_lut_extract (color->green,14 ) <<16 | +drm_color_lut_extract (color->blue,14 ); } + +static u32 chv_cgm_degamma_udw (const struct drm_color_lut *color) { +return drm_color_lut_extract (color->red,14 ); } + +static void chv_load_cgm_degamma (struct intel_crtc *crtc, +const struct drm_property_blob *blob) { +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +const struct drm_color_lut *lut = blob->data; +int i, lut_size =drm_color_lut_size (blob); +enum pipe pipe = crtc->pipe; + +for (i =0 ; i < lut_size; i++) { +I915_WRITE (CGM_PIPE_DEGAMMA (pipe, i,0 ), +chv_cgm_degamma_ldw (&lut[i])); +I915_WRITE (CGM_PIPE_DEGAMMA (pipe, i,1 ), +chv_cgm_degamma_udw (&lut[i])); + } +} + +static u32 chv_cgm_gamma_ldw (const struct drm_color_lut *color) { +return drm_color_lut_extract (color->green,10 ) <<16 | +drm_color_lut_extract (color->blue,10 ); } + +static u32 chv_cgm_gamma_udw (const struct drm_color_lut *color) { +return drm_color_lut_extract (color->red,10 ); } + +static void chv_load_cgm_gamma (struct intel_crtc *crtc, +const struct drm_property_blob *blob) { +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +const struct drm_color_lut *lut = blob->data; +int i, lut_size =drm_color_lut_size (blob); +enum pipe pipe = crtc->pipe; + +for (i =0 ; i < lut_size; i++) { +I915_WRITE (CGM_PIPE_GAMMA (pipe, i,0 ), +chv_cgm_gamma_ldw (&lut[i])); +I915_WRITE (CGM_PIPE_GAMMA (pipe, i,1 ), +chv_cgm_gamma_udw (&lut[i])); + } +} + +static void chv_load_luts (const struct intel_crtc_state *crtc_state) {struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);const struct drm_property_blob *gamma_lut = crtc_state->base.gamma_lut;const struct drm_property_blob *degamma_lut = crtc_state->base.degamma_lut; -enum pipe pipe = crtc->pipe;cherryview_load_csc_matrix (crtc_state);
@@ -799,41 +851,11 @@ static void cherryview_load_luts(const struct intel_crtc_state *crtc_state)return ; } -if (degamma_lut) { -const struct drm_color_lut *lut = degamma_lut->data; -int i, lut_size =INTEL_INFO (dev_priv)->color.degamma_lut_size; +if (degamma_lut) +chv_load_cgm_degamma (crtc, degamma_lut); -for (i =0 ; i < lut_size; i++) { -u32 word0, word1; - -/* Write LUT in U0.14 format. */ - word0 = - (drm_color_lut_extract (lut[i].green,14 ) <<16 ) | -drm_color_lut_extract (lut[i].blue,14 ); - word1 =drm_color_lut_extract (lut[i].red,14 ); - -I915_WRITE (CGM_PIPE_DEGAMMA (pipe, i,0 ), word0); -I915_WRITE (CGM_PIPE_DEGAMMA (pipe, i,1 ), word1); - } - } - -if (gamma_lut) { -const struct drm_color_lut *lut = gamma_lut->data; -int i, lut_size =INTEL_INFO (dev_priv)->color.gamma_lut_size; - -for (i =0 ; i < lut_size; i++) { -u32 word0, word1; - -/* Write LUT in U0.10 format. */ - word0 = - (drm_color_lut_extract (lut[i].green,10 ) <<16 ) | -drm_color_lut_extract (lut[i].blue,10 ); - word1 =drm_color_lut_extract (lut[i].red,10 ); - -I915_WRITE (CGM_PIPE_GAMMA (pipe, i,0 ), word0); -I915_WRITE (CGM_PIPE_GAMMA (pipe, i,1 ), word1); - } - } +if (gamma_lut) +chv_load_cgm_gamma (crtc, gamma_lut); } void intel_color_load_luts(const struct intel_crtc_state *crtc_state) @@ -1232,7 +1254,7 @@ void intel_color_init(struct intel_crtc *crtc)
if (IS_CHERRYVIEW(dev_priv)) {
dev_priv->display.color_check = chv_color_check; dev_priv->display.color_commit = i9xx_color_commit;
- dev_priv->display.load_luts = cherryview_load_luts;
+ dev_priv->display.load_luts = chv_load_luts;
} else if (INTEL_GEN(dev_priv) >= 4) {
dev_priv->display.color_check = i9xx_color_check; dev_priv->display.color_commit = i9xx_color_commit;
--
2.21.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx