diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-04-17 05:38:18 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-04-17 05:38:18 +0000 |
commit | 6fe724530184a3cd40c2efb8742d85a94942ae46 (patch) | |
tree | 0cdb02cc0f09c1c2e3f349da83915bbfb4e17fb4 /sys/dev | |
parent | ff7c5549dbe87909375de7d03370381a6603e598 (diff) |
drm/i915: Split icl_color_commit_noarm() from skl_color_commit_noarm()
From Ville Syrjala
726825297dd6aaa2d91daf7c1c2fd030859cc6cb in linux-6.1.y/6.1.24
76b767d4d1cd052e455cf18e06929e8b2b70101d in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/i915/display/intel_color.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915/display/intel_color.c b/sys/dev/pci/drm/i915/display/intel_color.c index c85757f5511..78211e583fd 100644 --- a/sys/dev/pci/drm/i915/display/intel_color.c +++ b/sys/dev/pci/drm/i915/display/intel_color.c @@ -2098,6 +2098,25 @@ static void glk_read_luts(struct intel_crtc_state *crtc_state) } } +static void icl_color_commit_arm(const struct intel_crtc_state *crtc_state) +{ + struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); + struct drm_i915_private *i915 = to_i915(crtc->base.dev); + enum pipe pipe = crtc->pipe; + + /* + * We don't (yet) allow userspace to control the pipe background color, + * so force it to black. + */ + intel_de_write(i915, SKL_BOTTOM_COLOR(pipe), 0); + + intel_de_write(i915, GAMMA_MODE(crtc->pipe), + crtc_state->gamma_mode); + + intel_de_write_fw(i915, PIPE_CSC_MODE(crtc->pipe), + crtc_state->csc_mode); +} + static struct drm_property_blob * icl_read_lut_multi_segment(struct intel_crtc *crtc) { @@ -2183,7 +2202,7 @@ static const struct intel_color_funcs i9xx_color_funcs = { static const struct intel_color_funcs icl_color_funcs = { .color_check = icl_color_check, .color_commit_noarm = icl_color_commit_noarm, - .color_commit_arm = skl_color_commit_arm, + .color_commit_arm = icl_color_commit_arm, .load_luts = icl_load_luts, .read_luts = icl_read_luts, }; |