[Intel-gfx] [PATCH] drm/i915/dsb: Remove check for dsb in dsb_commit

Andrzej Hajda andrzej.hajda at intel.com
Thu Dec 29 11:21:32 UTC 2022


On 22.12.2022 07:34, Ankit Nautiyal wrote:
> The dsb context should be already checked for NULL, before dsb_commit gets
> called. So remove the check for dsb inside dsb_commit.
> 
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_dsb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
> index 3d63c1bf1e4f..ce1f8e0c2cd9 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -228,7 +228,7 @@ void intel_dsb_commit(struct intel_dsb *dsb)
>   	enum pipe pipe = crtc->pipe;
>   	u32 tail;
>   
> -	if (!(dsb && dsb->free_pos))
> +	if (!dsb->free_pos)

Alternative would be allow passing NULL dsb, ie. removal of check on the 
caller.
Anyway:
Reviewed-by: Andrzej Hajda <andrzej.hajda at intel.com>

Regards
Andrzej

>   		return;
>   
>   	if (!intel_dsb_enable_engine(dev_priv, pipe, dsb->id))



More information about the Intel-gfx mailing list