Skip to content

Commit efa43b7

Browse files
committed
drm/i915/display: add intel_encoder_is_hdmi()
Similar to intel_encoder_is_dp() and friends. Cc: Sergey Senozhatsky <[email protected]> Cc: Ville Syrjala <[email protected]> Reviewed-by: Suraj Kandpal <[email protected]> Tested-by: Sergey Senozhatsky <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/e6bf9e01deb5d0d8b566af128a762d1313638847.1735568047.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <[email protected]>
1 parent 8ea07e2 commit efa43b7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/gpu/drm/i915/display/intel_display_types.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,6 +1968,19 @@ static inline bool intel_encoder_is_dp(struct intel_encoder *encoder)
19681968
}
19691969
}
19701970

1971+
static inline bool intel_encoder_is_hdmi(struct intel_encoder *encoder)
1972+
{
1973+
switch (encoder->type) {
1974+
case INTEL_OUTPUT_HDMI:
1975+
return true;
1976+
case INTEL_OUTPUT_DDI:
1977+
/* See if the HDMI encoder is valid. */
1978+
return i915_mmio_reg_valid(enc_to_intel_hdmi(encoder)->hdmi_reg);
1979+
default:
1980+
return false;
1981+
}
1982+
}
1983+
19711984
static inline struct intel_lspcon *
19721985
enc_to_intel_lspcon(struct intel_encoder *encoder)
19731986
{

0 commit comments

Comments
 (0)