Skip to contentSkip to conversation

drm/i915: Fix ICL output CSC programming

PATCH In review Ville Syrjala 6 participants 7 messages Apr 25, 2019 – May 1, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Fix ICL output CSC programming

From: Ville Syrjälä <[email protected]>

When I refactored the code into its own function I accidentally misplaced the <<16 shifts for some of the registers causing us to lose the blue channel entirely.

We should really find a way to test this...

Cc Uma Shankar <[email protected]>
Fixes d2c19b06d6ea ("drm/i915: Clean up ilk/icl pipe/output CSC programming")
---
 drivers/gpu/drm/i915/intel_color.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_color.c +3 -3
index ca341a9e47e6..9093daabc290 100644
@@ -173,13 +173,13 @@ static void icl_update_output_csc(struct intel_crtc *crtc,
 	I915_WRITE(PIPE_CSC_OUTPUT_PREOFF_LO(pipe), preoff[2]);
 
 	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RY_GY(pipe), coeff[0] << 16 | coeff[1]);
-	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BY(pipe), coeff[2]);
+	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BY(pipe), coeff[2] << 16);
 
 	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RU_GU(pipe), coeff[3] << 16 | coeff[4]);
-	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BU(pipe), coeff[5]);
+	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BU(pipe), coeff[5] << 16);
 
 	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RV_GV(pipe), coeff[6] << 16 | coeff[7]);
-	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BV(pipe), coeff[8]);
+	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BV(pipe), coeff[8] << 16);
 
 	I915_WRITE(PIPE_CSC_OUTPUT_POSTOFF_HI(pipe), postoff[0]);
 	I915_WRITE(PIPE_CSC_OUTPUT_POSTOFF_ME(pipe), postoff[1]);
Signature · 6 lines
2.21.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for drm/i915: Fix ICL output CSC programming

== Series Details ==

== Series Details ==

Series: drm/i915: Fix ICL output CSC programming
URL : https://patchwork.freedesktop.org/series/59955/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6000 -> Patchwork_12878
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/59955/revisions/1/mbox/

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_12878:

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@kms_chamelium@dp-hpd-fast:
- {fi-icl-u2}: NOTRUN -> [FAIL][1] +3 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/fi-icl-u2/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_12878 that come from known issues:

### IGT changes ###

#### Possible fixes ####

* igt@i915_selftest@live_contexts:
- fi-bdw-gvtdvm: [DMESG-FAIL][2] ([fdo#110235 ]) -> [PASS][3]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235

Participating hosts (32 -> 34)
------------------------------

Additional (13): fi-skl-6770hq fi-icl-u2 fi-cfl-guc fi-apl-guc fi-bxt-j4205 fi-ivb-3770 fi-icl-u3 fi-cfl-8109u fi-bsw-kefka fi-blb-e6850 fi-byt-n2820 fi-icl-dsi fi-kbl-r
Missing (11): fi-kbl-soraka fi-ilk-m540 fi-bsw-cyan fi-snb-2520m fi-kbl-guc fi-ctg-p8600 fi-kbl-x1275 fi-pnv-d510 fi-icl-y fi-skl-lmem fi-skl-6700k2

Build changes
-------------

* Linux: CI_DRM_6000 -> Patchwork_12878

CI_DRM_6000: a0c3fff52846356f63dd210cddf81e5bb01e7aa0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4966: a75429544f5721316b04a36551c57573e0c79486 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12878: 75463058a0740605ec3ecf133452e9aca2df7955 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

75463058a074 drm/i915: Fix ICL output CSC programming

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Ville Syrjala
Quoted 7 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

When I refactored the code into its own function I accidentally misplaced the <<16 shifts for some of the registers causing us to lose the blue channel entirely.

Quoted 5 lines

We should really find a way to test this...

Cc Uma Shankar <[email protected]>
Fixes d2c19b06d6ea ("drm/i915: Clean up ilk/icl pipe/output CSC programming")

+Clint

Does this fix the problem you reported earlier this week?

Lucas De Marchi

Quoted 32 lines
---
 drivers/gpu/drm/i915/intel_color.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_color.c +3 -4
index ca341a9e47e6..9093daabc290 100644
@@ -173,13 +173,13 @@ static void icl_update_output_csc(struct intel_crtc *crtc,
        I915_WRITE(PIPE_CSC_OUTPUT_PREOFF_LO(pipe), preoff[2]);
 
        I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RY_GY(pipe), coeff[0] << 16 | coeff[1]);
-       I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BY(pipe), coeff[2]);
+       I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BY(pipe), coeff[2] << 16);
 
        I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RU_GU(pipe), coeff[3] << 16 | coeff[4]);
-       I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BU(pipe), coeff[5]);
+       I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BU(pipe), coeff[5] << 16);
 
        I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RV_GV(pipe), coeff[6] << 16 | coeff[7]);
-       I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BV(pipe), coeff[8]);
+       I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BV(pipe), coeff[8] << 16);
 
        I915_WRITE(PIPE_CSC_OUTPUT_POSTOFF_HI(pipe), postoff[0]);
        I915_WRITE(PIPE_CSC_OUTPUT_POSTOFF_ME(pipe), postoff[1]);
--

2.21.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 5 lines
Lucas De Marchi
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 8 lines · Lucas De Marchi
Quoted 6 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

When I refactored the code into its own function I accidentally misplaced the <<16 shifts for some of the registers causing us to lose the blue channel entirely.

Quoted 8 lines
Quoted 5 lines

We should really find a way to test this...

Cc Uma Shankar <[email protected]>
Fixes d2c19b06d6ea ("drm/i915: Clean up ilk/icl pipe/output CSC programming")

+Clint

Does this fix the problem you reported earlier this week?

Yes, Colors now appear correctly in many failing modes.

Clint

Quoted 31 lines

Lucas De Marchi

Quoted 28 lines
---
  drivers/gpu/drm/i915/intel_color.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_color.c +3 -4
index ca341a9e47e6..9093daabc290 100644
@@ -173,13 +173,13 @@ static void icl_update_output_csc(struct intel_crtc *crtc,
         I915_WRITE(PIPE_CSC_OUTPUT_PREOFF_LO(pipe), preoff[2]);
 
         I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RY_GY(pipe), coeff[0] << 16 | coeff[1]);
-       I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BY(pipe), coeff[2]);
+       I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BY(pipe), coeff[2] << 16);
 
         I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RU_GU(pipe), coeff[3] << 16 | coeff[4]);
-       I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BU(pipe), coeff[5]);
+       I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BU(pipe), coeff[5] << 16);
 
         I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RV_GV(pipe), coeff[6] << 16 | coeff[7]);
-       I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BV(pipe), coeff[8]);
+       I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BV(pipe), coeff[8] << 16);
 
         I915_WRITE(PIPE_CSC_OUTPUT_POSTOFF_HI(pipe), postoff[0]);
         I915_WRITE(PIPE_CSC_OUTPUT_POSTOFF_ME(pipe), postoff[1]);
--

2.21.0

Quoted 6 lines
Quoted 4 lines

_______________________________________________
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

#4 lore raw

✓ Fi.CI.IGT: success for drm/i915: Fix ICL output CSC programming

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: drm/i915: Fix ICL output CSC programming
URL : https://patchwork.freedesktop.org/series/59955/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6000_full -> Patchwork_12878_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Known issues
------------

Here are the changes found in Patchwork_12878_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_eio@unwedge-stress:
- shard-snb: [PASS][1] -> [FAIL][2] ([fdo#109661])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-snb5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-snb2/igt@[email protected]

* igt@gem_exec_whisper@normal:
- shard-apl: [PASS][3] -> [INCOMPLETE][4] ([fdo#103927]) +2 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-apl1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-apl8/igt@[email protected]

* igt@gem_softpin@noreloc-s3:
- shard-skl: [PASS][5] -> [INCOMPLETE][6] ([fdo#104108] / [fdo#107773])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-skl5/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-skl1/igt@[email protected]

* igt@gem_tiled_swapping@non-threaded:
- shard-hsw: [PASS][7] -> [FAIL][8] ([fdo#108686])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-hsw2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-hsw2/igt@[email protected]

* igt@i915_suspend@debugfs-reader:
- shard-apl: [PASS][9] -> [DMESG-WARN][10] ([fdo#108566]) +5 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-apl4/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-apl6/igt@[email protected]

* igt@kms_cursor_crc@cursor-64x64-dpms:
- shard-skl: [PASS][11] -> [FAIL][12] ([fdo#103232])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-skl8/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-skl7/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-glk: [PASS][13] -> [FAIL][14] ([fdo#102887] / [fdo#105363])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-glk4/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-glk5/igt@[email protected]

* igt@kms_flip_tiling@flip-changes-tiling:
- shard-skl: [PASS][15] -> [FAIL][16] ([fdo#108303])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-skl10/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-skl7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render:
- shard-iclb: [PASS][17] -> [FAIL][18] ([fdo#103167]) +2 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-iclb4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render.html

* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [PASS][19] -> [FAIL][20] ([fdo#108145] / [fdo#110403])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-skl8/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-skl7/igt@[email protected]

* igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format:
- shard-glk: [PASS][21] -> [SKIP][22] ([fdo#109271] / [fdo#109278])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-glk9/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-glk5/igt@[email protected]

* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][23] -> [SKIP][24] ([fdo#109642])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb2/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-iclb3/igt@[email protected]

* igt@kms_psr@psr2_sprite_blt:
- shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109441]) +2 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb2/igt@kms_psr@psr2_sprite_blt.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-iclb8/igt@kms_psr@psr2_sprite_blt.html

#### Possible fixes ####

* igt@kms_cursor_crc@cursor-256x256-suspend:
- shard-kbl: [DMESG-WARN][27] ([fdo#108566]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-kbl5/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-kbl4/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
- shard-iclb: [FAIL][29] ([fdo#103167]) -> [PASS][30] +5 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb2/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-iclb3/igt@[email protected]

* igt@kms_plane@pixel-format-pipe-b-planes:
- shard-glk: [SKIP][31] ([fdo#109271]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-glk4/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-glk9/igt@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-apl: [DMESG-WARN][33] ([fdo#108566]) -> [PASS][34] +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-apl6/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-apl1/igt@[email protected]

* igt@kms_psr@psr2_cursor_mmap_cpu:
- shard-iclb: [SKIP][35] ([fdo#109441]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb1/igt@kms_psr@psr2_cursor_mmap_cpu.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: [FAIL][37] ([fdo#109016]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-kbl7/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-kbl3/igt@[email protected]

* igt@kms_setmode@basic:
- shard-apl: [FAIL][39] ([fdo#99912]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-apl2/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-apl6/igt@[email protected]

* igt@kms_sysfs_edid_timing:
- shard-iclb: [FAIL][41] ([fdo#100047]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb3/igt@kms_sysfs_edid_timing.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-iclb5/igt@kms_sysfs_edid_timing.html

#### Warnings ####

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-f:
- shard-iclb: [SKIP][43] ([fdo#109278]) -> [INCOMPLETE][44] ([fdo#107713])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb1/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12878/shard-iclb1/igt@[email protected]

[fdo#100047]: https://bugs.freedesktop.org/show_bug.cgi?id=100047
[fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107773]: https://bugs.freedesktop.org/show_bug.cgi?id=107773
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108303]: https://bugs.freedesktop.org/show_bug.cgi?id=108303
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[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#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (10 -> 9)
------------------------------

Missing (1): pig-skl-6260u

Build changes
-------------

* Linux: CI_DRM_6000 -> Patchwork_12878

CI_DRM_6000: a0c3fff52846356f63dd210cddf81e5bb01e7aa0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4966: a75429544f5721316b04a36551c57573e0c79486 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12878: 75463058a0740605ec3ecf133452e9aca2df7955 @ 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_12878/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#5 lore raw
In reply to Ville Syrjala

Thanks and Regards,
Swati

-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Ville Syrjala
Sent: Friday, April 26, 2019 12:54 AM
To: [email protected]
Subject: [Intel-gfx] [PATCH] drm/i915: Fix ICL output CSC programming

From: Ville Syrjälä <[email protected]>

When I refactored the code into its own function I accidentally misplaced the <<16 shifts for some of the registers causing us to lose the blue channel entirely.

We should really find a way to test this...

Cc Uma Shankar <[email protected]>
Fixes d2c19b06d6ea ("drm/i915: Clean up ilk/icl pipe/output CSC programming")
---
 drivers/gpu/drm/i915/intel_color.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_color.c +3 -3
index ca341a9e47e6..9093daabc290 100644
@@ -173,13 +173,13 @@ static void icl_update_output_csc(struct intel_crtc *crtc,
 	I915_WRITE(PIPE_CSC_OUTPUT_PREOFF_LO(pipe), preoff[2]);
 
 	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RY_GY(pipe), coeff[0] << 16 | coeff[1]);
-	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BY(pipe), coeff[2]);
+	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BY(pipe), coeff[2] << 16);
 
 	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RU_GU(pipe), coeff[3] << 16 | coeff[4]);
-	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BU(pipe), coeff[5]);
+	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BU(pipe), coeff[5] << 16);
 
 	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RV_GV(pipe), coeff[6] << 16 | coeff[7]);
-	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BV(pipe), coeff[8]);
+	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BV(pipe), coeff[8] << 16);
 
 	I915_WRITE(PIPE_CSC_OUTPUT_POSTOFF_HI(pipe), postoff[0]);
 	I915_WRITE(PIPE_CSC_OUTPUT_POSTOFF_ME(pipe), postoff[1]);

--
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

Reviewed-by on v1 1/1
#6 lore raw
In reply to Ville Syrjala
Quoted 9 lines

-----Original Message-----
From: Ville Syrjala [mailto:[email protected]]
Sent: Friday, April 26, 2019 12:54 AM
To: [email protected]
Cc: Shankar, Uma <[email protected]>
Subject: [PATCH] drm/i915: Fix ICL output CSC programming

Quoted 4 lines

From: Ville Syrjälä <[email protected]>

When I refactored the code into its own function I accidentally misplaced the <<16 shifts for some of the registers causing us to lose the blue channel entirely.

This looks Good.

Quoted 1 line

We should really find a way to test this...

I guess we need to implement the pipe writeback and dump the converted output and do a bit compare with reference buffer. Not sure if we have any other ways of testing it accurately.

Quoted 29 lines
Cc Uma Shankar <[email protected]>
Fixes d2c19b06d6ea ("drm/i915: Clean up ilk/icl pipe/output CSC programming")

---
drivers/gpu/drm/i915/intel_color.c | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_color.c +3 -3
index ca341a9e47e6..9093daabc290 100644
@@ -173,13 +173,13 @@ static void icl_update_output_csc(struct intel_crtc *crtc,
 	I915_WRITE(PIPE_CSC_OUTPUT_PREOFF_LO(pipe), preoff[2]);
 
 	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RY_GY(pipe), coeff[0] << 16 |
 coeff[1]);
-	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BY(pipe), coeff[2]);
+	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BY(pipe), coeff[2] << 16);
 
 	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RU_GU(pipe), coeff[3] << 16 |
 coeff[4]);
-	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BU(pipe), coeff[5]);
+	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BU(pipe), coeff[5] << 16);
 
 	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_RV_GV(pipe), coeff[6] << 16 |
 coeff[7]);
-	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BV(pipe), coeff[8]);
+	I915_WRITE(PIPE_CSC_OUTPUT_COEFF_BV(pipe), coeff[8] << 16);
Quoted 4 lines
	I915_WRITE(PIPE_CSC_OUTPUT_POSTOFF_HI(pipe), postoff[0]);
	I915_WRITE(PIPE_CSC_OUTPUT_POSTOFF_ME(pipe), postoff[1]);

--
2.21.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx