drm/i915: Fix warn in intel_display_power_*_domain() functions
The intel_display_power_*_domain() functions should always warn if a default domain is returned as a fallback, fix this up. Spotted by Ville. Fixes:979e1b32e0
("drm/i915: Sanitize the port -> DDI/AUX power domain mapping for each platform") Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Jouni Högander <jouni.hogander@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221114122251.21327-2-imre.deak@intel.com (cherry picked from commit10b85f0e1d
) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
This commit is contained in:
parent
00a6c36cca
commit
ebbaa4392e
@ -2434,7 +2434,7 @@ intel_display_power_ddi_io_domain(struct drm_i915_private *i915, enum port port)
|
||||
{
|
||||
const struct intel_ddi_port_domains *domains = intel_port_domains_for_port(i915, port);
|
||||
|
||||
if (drm_WARN_ON(&i915->drm, !domains) || domains->ddi_io == POWER_DOMAIN_INVALID)
|
||||
if (drm_WARN_ON(&i915->drm, !domains || domains->ddi_io == POWER_DOMAIN_INVALID))
|
||||
return POWER_DOMAIN_PORT_DDI_IO_A;
|
||||
|
||||
return domains->ddi_io + (int)(port - domains->port_start);
|
||||
@ -2445,7 +2445,7 @@ intel_display_power_ddi_lanes_domain(struct drm_i915_private *i915, enum port po
|
||||
{
|
||||
const struct intel_ddi_port_domains *domains = intel_port_domains_for_port(i915, port);
|
||||
|
||||
if (drm_WARN_ON(&i915->drm, !domains) || domains->ddi_lanes == POWER_DOMAIN_INVALID)
|
||||
if (drm_WARN_ON(&i915->drm, !domains || domains->ddi_lanes == POWER_DOMAIN_INVALID))
|
||||
return POWER_DOMAIN_PORT_DDI_LANES_A;
|
||||
|
||||
return domains->ddi_lanes + (int)(port - domains->port_start);
|
||||
@ -2471,7 +2471,7 @@ intel_display_power_legacy_aux_domain(struct drm_i915_private *i915, enum aux_ch
|
||||
{
|
||||
const struct intel_ddi_port_domains *domains = intel_port_domains_for_aux_ch(i915, aux_ch);
|
||||
|
||||
if (drm_WARN_ON(&i915->drm, !domains) || domains->aux_legacy_usbc == POWER_DOMAIN_INVALID)
|
||||
if (drm_WARN_ON(&i915->drm, !domains || domains->aux_legacy_usbc == POWER_DOMAIN_INVALID))
|
||||
return POWER_DOMAIN_AUX_A;
|
||||
|
||||
return domains->aux_legacy_usbc + (int)(aux_ch - domains->aux_ch_start);
|
||||
@ -2482,7 +2482,7 @@ intel_display_power_tbt_aux_domain(struct drm_i915_private *i915, enum aux_ch au
|
||||
{
|
||||
const struct intel_ddi_port_domains *domains = intel_port_domains_for_aux_ch(i915, aux_ch);
|
||||
|
||||
if (drm_WARN_ON(&i915->drm, !domains) || domains->aux_tbt == POWER_DOMAIN_INVALID)
|
||||
if (drm_WARN_ON(&i915->drm, !domains || domains->aux_tbt == POWER_DOMAIN_INVALID))
|
||||
return POWER_DOMAIN_AUX_TBT1;
|
||||
|
||||
return domains->aux_tbt + (int)(aux_ch - domains->aux_ch_start);
|
||||
|
Loading…
Reference in New Issue
Block a user