drm/i915: Beef up SDVO/HDMI port checks
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 16 Jun 2023 14:08:18 +0000 (17:08 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 20 Jun 2023 16:07:48 +0000 (19:07 +0300)
commit39432640ca99e952095b60baf219c8f17c38a55d
tree9381bf1d76eed5538c9fc961e07f5798ba12d00e
parent679df6f19f1ebf575f440a704bcb9fe5b6c1f7ed
drm/i915: Beef up SDVO/HDMI port checks

The SDVO code already warns when the port in question doesn't
actually support SDVO. Let's make that also bail the encoder
registration like the generic assert_port_valid() we added.

And add a similar thing for g4x HDMI, mainly because on g4x
itsefl port D only supports DP but not SDVO/HDMI. For the
other platforms the generic port_mask check should actually
be sufficient, but since we're here might as well list the
ports.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230616140820.11726-6-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/g4x_hdmi.c
drivers/gpu/drm/i915/display/intel_sdvo.c