lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201102101724.GO401619@phenom.ffwll.local>
Date:   Mon, 2 Nov 2020 11:17:24 +0100
From:   Daniel Vetter <daniel@...ll.ch>
To:     Bernard Zhao <bernard@...o.com>
Cc:     Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        opensource.kernel@...o.com
Subject: Re: [PATCH] gpu/drm: make crtc check before new_connector circle

On Sun, Nov 01, 2020 at 06:58:51PM -0800, Bernard Zhao wrote:
> In function prepare_signaling, crtc check (c==0) is not related
> with the next new_connector circle, maybe we can put the crtc
> check just after the crtc circle and before new_connector circle.
> This change is to make the code to run a bit first.

I'm a bit confused here with your explanation, I'm not understanding why
you do this change ... Can you pls elaborate? Maybe give an example or
something of the problem this patch solves, that often helps.

Thanks, Daniel

> 
> Signed-off-by: Bernard Zhao <bernard@...o.com>
> ---
>  drivers/gpu/drm/drm_atomic_uapi.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
> index 25c269bc4681..566110996474 100644
> --- a/drivers/gpu/drm/drm_atomic_uapi.c
> +++ b/drivers/gpu/drm/drm_atomic_uapi.c
> @@ -1182,6 +1182,12 @@ static int prepare_signaling(struct drm_device *dev,
>  
>  		c++;
>  	}
> +	/*
> +	 * Having this flag means user mode pends on event which will never
> +	 * reach due to lack of at least one CRTC for signaling
> +	 */
> +	if (c == 0 && (arg->flags & DRM_MODE_PAGE_FLIP_EVENT))
> +		return -EINVAL;
>  
>  	for_each_new_connector_in_state(state, conn, conn_state, i) {
>  		struct drm_writeback_connector *wb_conn;
> @@ -1220,13 +1226,6 @@ static int prepare_signaling(struct drm_device *dev,
>  		conn_state->writeback_job->out_fence = fence;
>  	}
>  
> -	/*
> -	 * Having this flag means user mode pends on event which will never
> -	 * reach due to lack of at least one CRTC for signaling
> -	 */
> -	if (c == 0 && (arg->flags & DRM_MODE_PAGE_FLIP_EVENT))
> -		return -EINVAL;
> -
>  	return 0;
>  }
>  
> -- 
> 2.29.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ