diff mbox series

drm/i915/display/tc: Only WARN once for bogus tc port flag

Message ID 20201209211828.53193-1-sean@poorly.run (mailing list archive)
State New, archived
Headers show
Series drm/i915/display/tc: Only WARN once for bogus tc port flag | expand

Commit Message

Sean Paul Dec. 9, 2020, 9:16 p.m. UTC
From: Sean Paul <seanpaul@chromium.org>

No need to spam syslog/console when we can ignore/fix the flag.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/i915/display/intel_tc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rodrigo Vivi Dec. 9, 2020, 11:56 p.m. UTC | #1
On Wed, Dec 09, 2020 at 04:16:36PM -0500, Sean Paul wrote:
> From: Sean Paul <seanpaul@chromium.org>
> 
> No need to spam syslog/console when we can ignore/fix the flag.

besides that we are calling from multiple places anyway..

> 
> Signed-off-by: Sean Paul <seanpaul@chromium.org>


Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>



> ---
>  drivers/gpu/drm/i915/display/intel_tc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
> index 4346bc1a747a..27dc2dad6809 100644
> --- a/drivers/gpu/drm/i915/display/intel_tc.c
> +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> @@ -262,7 +262,7 @@ static u32 tc_port_live_status_mask(struct intel_digital_port *dig_port)
>  		mask |= BIT(TC_PORT_LEGACY);
>  
>  	/* The sink can be connected only in a single mode. */
> -	if (!drm_WARN_ON(&i915->drm, hweight32(mask) > 1))
> +	if (!drm_WARN_ON_ONCE(&i915->drm, hweight32(mask) > 1))
>  		tc_port_fixup_legacy_flag(dig_port, mask);
>  
>  	return mask;
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Jani Nikula Dec. 11, 2020, 1:18 p.m. UTC | #2
On Wed, 09 Dec 2020, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> On Wed, Dec 09, 2020 at 04:16:36PM -0500, Sean Paul wrote:
>> From: Sean Paul <seanpaul@chromium.org>
>> 
>> No need to spam syslog/console when we can ignore/fix the flag.
>
> besides that we are calling from multiple places anyway..
>
>> 
>> Signed-off-by: Sean Paul <seanpaul@chromium.org>
>
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Thanks, pushed to din.

BR,
Jani.

>
>
>
>> ---
>>  drivers/gpu/drm/i915/display/intel_tc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
>> index 4346bc1a747a..27dc2dad6809 100644
>> --- a/drivers/gpu/drm/i915/display/intel_tc.c
>> +++ b/drivers/gpu/drm/i915/display/intel_tc.c
>> @@ -262,7 +262,7 @@ static u32 tc_port_live_status_mask(struct intel_digital_port *dig_port)
>>  		mask |= BIT(TC_PORT_LEGACY);
>>  
>>  	/* The sink can be connected only in a single mode. */
>> -	if (!drm_WARN_ON(&i915->drm, hweight32(mask) > 1))
>> +	if (!drm_WARN_ON_ONCE(&i915->drm, hweight32(mask) > 1))
>>  		tc_port_fixup_legacy_flag(dig_port, mask);
>>  
>>  	return mask;
>> -- 
>> Sean Paul, Software Engineer, Google / Chromium OS
>> 
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
index 4346bc1a747a..27dc2dad6809 100644
--- a/drivers/gpu/drm/i915/display/intel_tc.c
+++ b/drivers/gpu/drm/i915/display/intel_tc.c
@@ -262,7 +262,7 @@  static u32 tc_port_live_status_mask(struct intel_digital_port *dig_port)
 		mask |= BIT(TC_PORT_LEGACY);
 
 	/* The sink can be connected only in a single mode. */
-	if (!drm_WARN_ON(&i915->drm, hweight32(mask) > 1))
+	if (!drm_WARN_ON_ONCE(&i915->drm, hweight32(mask) > 1))
 		tc_port_fixup_legacy_flag(dig_port, mask);
 
 	return mask;