Skip to content

Commit

Permalink
drm/i915/dsc: fix DSS CTL register usage for ICL DSI transcoders
Browse files Browse the repository at this point in the history
commit b61fde1 upstream.

Use the correct DSS CTL registers for ICL DSI transcoders.

As a side effect, this also brings back the sanity check for trying to
use pipe DSC registers on pipe A on ICL.

Fixes: 8a029c1 ("drm/i915/dp: Modify VDSC helpers to configure DSC for Bigjoiner slave")
References: http://lore.kernel.org/r/87eegxq2lq.fsf@intel.com
Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Animesh Manna <animesh.manna@intel.com>
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Cc: <stable@vger.kernel.org> # v5.11+
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210319115333.8330-1-jani.nikula@intel.com
(cherry picked from commit 5706d02)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
jnikula authored and gregkh committed Mar 30, 2021
1 parent 0f2b084 commit 890c8ee
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/gpu/drm/i915/display/intel_vdsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,20 +1016,14 @@ static i915_reg_t dss_ctl1_reg(const struct intel_crtc_state *crtc_state)
{
enum pipe pipe = to_intel_crtc(crtc_state->uapi.crtc)->pipe;

if (crtc_state->cpu_transcoder == TRANSCODER_EDP)
return DSS_CTL1;

return ICL_PIPE_DSS_CTL1(pipe);
return is_pipe_dsc(crtc_state) ? ICL_PIPE_DSS_CTL1(pipe) : DSS_CTL1;
}

static i915_reg_t dss_ctl2_reg(const struct intel_crtc_state *crtc_state)
{
enum pipe pipe = to_intel_crtc(crtc_state->uapi.crtc)->pipe;

if (crtc_state->cpu_transcoder == TRANSCODER_EDP)
return DSS_CTL2;

return ICL_PIPE_DSS_CTL2(pipe);
return is_pipe_dsc(crtc_state) ? ICL_PIPE_DSS_CTL2(pipe) : DSS_CTL2;
}

void intel_dsc_enable(struct intel_encoder *encoder,
Expand Down

0 comments on commit 890c8ee

Please sign in to comment.