Commit 6a08cbda authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Clean up transcoder_to_stream_enc_status()

Drop the pointless middle man variable and just return the
correct thing directly.  And while at it change the return
type to u32 since this is a register value we're returning.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-3-ville.syrjala@linux.intel.comReviewed-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 60c0df33
...@@ -19,28 +19,20 @@ ...@@ -19,28 +19,20 @@
#include "intel_hdcp.h" #include "intel_hdcp.h"
#include "intel_hdcp_regs.h" #include "intel_hdcp_regs.h"
static unsigned int transcoder_to_stream_enc_status(enum transcoder cpu_transcoder) static u32 transcoder_to_stream_enc_status(enum transcoder cpu_transcoder)
{ {
u32 stream_enc_mask;
switch (cpu_transcoder) { switch (cpu_transcoder) {
case TRANSCODER_A: case TRANSCODER_A:
stream_enc_mask = HDCP_STATUS_STREAM_A_ENC; return HDCP_STATUS_STREAM_A_ENC;
break;
case TRANSCODER_B: case TRANSCODER_B:
stream_enc_mask = HDCP_STATUS_STREAM_B_ENC; return HDCP_STATUS_STREAM_B_ENC;
break;
case TRANSCODER_C: case TRANSCODER_C:
stream_enc_mask = HDCP_STATUS_STREAM_C_ENC; return HDCP_STATUS_STREAM_C_ENC;
break;
case TRANSCODER_D: case TRANSCODER_D:
stream_enc_mask = HDCP_STATUS_STREAM_D_ENC; return HDCP_STATUS_STREAM_D_ENC;
break;
default: default:
stream_enc_mask = 0; return 0;
} }
return stream_enc_mask;
} }
static void intel_dp_hdcp_wait_for_cp_irq(struct intel_hdcp *hdcp, int timeout) static void intel_dp_hdcp_wait_for_cp_irq(struct intel_hdcp *hdcp, int timeout)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment