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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190903203524.GJ218215@art_vandelay>
Date:   Tue, 3 Sep 2019 16:35:24 -0400
From:   Sean Paul <sean@...rly.run>
To:     Rob Clark <robdclark@...il.com>
Cc:     dri-devel@...ts.freedesktop.org,
        Rob Clark <robdclark@...omium.org>,
        Sean Paul <sean@...rly.run>, David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Jeykumar Sankaran <jsanka@...eaurora.org>,
        Jordan Crouse <jcrouse@...eaurora.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Sravanthi Kollukuduru <skolluku@...eaurora.org>,
        Bruce Wang <bzwang@...omium.org>,
        Jonathan Marek <jonathan@...ek.ca>,
        Mamta Shukla <mamtashukla555@...il.com>,
        Enrico Weigelt <info@...ux.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Georgi Djakov <georgi.djakov@...aro.org>,
        Allison Randal <allison@...utok.net>,
        Boris Brezillon <bbrezillon@...nel.org>,
        "open list:DRM DRIVER FOR MSM ADRENO GPU" 
        <linux-arm-msm@...r.kernel.org>,
        "open list:DRM DRIVER FOR MSM ADRENO GPU" 
        <freedreno@...ts.freedesktop.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 06/10] drm/msm: add kms->flush_commit()

On Thu, Aug 29, 2019 at 09:45:14AM -0700, Rob Clark wrote:
> From: Rob Clark <robdclark@...omium.org>
> 
> Add ->flush_commit(crtc_mask).  Currently a no-op, but kms backends
> should migrate writing flush registers to this hook, so we can decouple
> pushing updates to hardware, and flushing the updates.
> 
> Once we add async commit support, the hw updates will be pushed down to
> the hw synchronously, but flushing the updates will be deferred until as
> close to vblank as possible, so that multiple updates can be combined in
> a single frame.
> 
> Signed-off-by: Rob Clark <robdclark@...omium.org>
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c  |  6 ++++
>  drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c |  6 ++++
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c |  6 ++++
>  drivers/gpu/drm/msm/msm_atomic.c         |  9 ++++--
>  drivers/gpu/drm/msm/msm_kms.h            | 40 ++++++++++++++++++++++--
>  5 files changed, 63 insertions(+), 4 deletions(-)
> 

/snip

> diff --git a/drivers/gpu/drm/msm/msm_kms.h b/drivers/gpu/drm/msm/msm_kms.h
> index 10dd171b43f8..bb70c1758c72 100644
> --- a/drivers/gpu/drm/msm/msm_kms.h
> +++ b/drivers/gpu/drm/msm/msm_kms.h
> @@ -30,12 +30,47 @@ struct msm_kms_funcs {
>  	irqreturn_t (*irq)(struct msm_kms *kms);
>  	int (*enable_vblank)(struct msm_kms *kms, struct drm_crtc *crtc);
>  	void (*disable_vblank)(struct msm_kms *kms, struct drm_crtc *crtc);
> -	/* modeset, bracketing atomic_commit(): */
> +
> +	/*
> +	 * Atomic commit handling:
> +	 */
> +
> +	/**
> +	 * Prepare for atomic commit.  This is called after any previous
> +	 * (async or otherwise) commit has completed.
> +	 */
>  	void (*prepare_commit)(struct msm_kms *kms, struct drm_atomic_state *state);
> +
> +	/**
> +	 * Flush an atomic commit.  This is called after the hardware
> +	 * updates have already been pushed down to effected planes/
> +	 * crtcs/encoders/connectors.
> +	 */
> +	void (*flush_commit)(struct msm_kms *kms, unsigned crtc_mask);
> +
> +	/* TODO remove ->commit(), use ->flush_commit() instead: */
>  	void (*commit)(struct msm_kms *kms, struct drm_atomic_state *state);
> -	void (*complete_commit)(struct msm_kms *kms, unsigned crtc_mask);
> +
> +	/**
> +	 * Wait for any in-progress flush to complete on the specified
> +	 * crtcs.  This should not block if there is no in-progress
> +	 * commit (ie. don't just wait for a vblank), as it will also
> +	 * be called before ->prepare_commit() to ensure any potential
> +	 * "async" commit has completed.
> +	 */
>  	void (*wait_flush)(struct msm_kms *kms, unsigned crtc_mask);
>  
> +	/**
> +	 * Clean up are commit is completed.  This is called after

s/are/our/?

With that fixed,

Reviewed-by: Sean Paul <sean@...rly.run>



> +	 * ->wait_flush(), to give the backend a chance to do any
> +	 * post-commit cleanup.
> +	 */
> +	void (*complete_commit)(struct msm_kms *kms, unsigned crtc_mask);
> +
> +	/*
> +	 * Format handling:
> +	 */
> +
>  	/* get msm_format w/ optional format modifiers from drm_mode_fb_cmd2 */
>  	const struct msm_format *(*get_format)(struct msm_kms *kms,
>  					const uint32_t format,
> @@ -45,6 +80,7 @@ struct msm_kms_funcs {
>  			const struct msm_format *msm_fmt,
>  			const struct drm_mode_fb_cmd2 *cmd,
>  			struct drm_gem_object **bos);
> +
>  	/* misc: */
>  	long (*round_pixclk)(struct msm_kms *kms, unsigned long rate,
>  			struct drm_encoder *encoder);
> -- 
> 2.21.0
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ