From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Gustavo Padovan <gustavo@padovan.org>, linux-samsung-soc@vger.kernel.org
Cc: tjakobi@math.uni-bielefeld.de,
Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 08/23] drm/exynos: pass struct exynos_drm_plane in update/enable
Date: Thu, 02 Jul 2015 21:38:54 +0900 [thread overview]
Message-ID: <559530DE.6060008@samsung.com> (raw)
In-Reply-To: <1435095336-6196-9-git-send-email-gustavo@padovan.org>
On 06/24/2015 06:35 AM, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>
> We already have the plane pointer in before calling .update_plane() or
> disable_plane() so pass it directly to those calls avoiding a new
> conversion from zpos to struct exynos_drm_plane.
>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
> drivers/gpu/drm/exynos/exynos7_drm_decon.c | 22 +++++++---------------
> drivers/gpu/drm/exynos/exynos_drm_drv.h | 6 ++++--
> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 25 +++++++------------------
> drivers/gpu/drm/exynos/exynos_drm_plane.c | 4 ++--
> drivers/gpu/drm/exynos/exynos_drm_vidi.c | 9 ++-------
> drivers/gpu/drm/exynos/exynos_mixer.c | 20 +++++++++++---------
> 6 files changed, 33 insertions(+), 53 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> index c69985e..1f5f5c7 100644
> --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> @@ -392,24 +392,20 @@ static void decon_shadow_protect_win(struct decon_context *ctx,
> writel(val, ctx->regs + SHADOWCON);
> }
>
> -static void decon_update_plane(struct exynos_drm_crtc *crtc, unsigned int win)
> +static void decon_update_plane(struct exynos_drm_crtc *crtc,
> + struct exynos_drm_plane *plane)
> {
> struct decon_context *ctx = crtc->ctx;
> struct drm_display_mode *mode = &crtc->base.state->adjusted_mode;
> - struct exynos_drm_plane *plane;
> int padding;
> unsigned long val, alpha;
> unsigned int last_x;
> unsigned int last_y;
> + unsigned int win = plane->zpos;
>
> if (ctx->suspended)
> return;
>
> - if (win < 0 || win >= WINDOWS_NR)
> - return;
> -
> - plane = &ctx->planes[win];
> -
> /*
> * SHADOWCON/PRTCON register is used for enabling timing.
> *
> @@ -502,17 +498,13 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc, unsigned int win)
> writel(val, ctx->regs + DECON_UPDATE);
> }
>
> -static void decon_disable_plane(struct exynos_drm_crtc *crtc, unsigned int win)
> +static void decon_disable_plane(struct exynos_drm_crtc *crtc,
> + struct exynos_drm_plane *plane)
> {
> struct decon_context *ctx = crtc->ctx;
> - struct exynos_drm_plane *plane;
> + unsigned int win = plane->zpos;
> u32 val;
>
> - if (win < 0 || win >= WINDOWS_NR)
> - return;
> -
> - plane = &ctx->planes[win];
> -
> if (ctx->suspended)
> return;
>
> @@ -608,7 +600,7 @@ static void decon_disable(struct exynos_drm_crtc *crtc)
> * a destroyed buffer later.
> */
> for (i = 0; i < WINDOWS_NR; i++)
> - decon_disable_plane(crtc, i);
> + decon_disable_plane(crtc, &ctx->planes[i]);
>
> clk_disable_unprepare(ctx->vclk);
> clk_disable_unprepare(ctx->eclk);
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
> index 6f44988..68a7566 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
> @@ -173,8 +173,10 @@ struct exynos_drm_crtc_ops {
> int (*enable_vblank)(struct exynos_drm_crtc *crtc);
> void (*disable_vblank)(struct exynos_drm_crtc *crtc);
> void (*wait_for_vblank)(struct exynos_drm_crtc *crtc);
> - void (*update_plane)(struct exynos_drm_crtc *crtc, unsigned int zpos);
> - void (*disable_plane)(struct exynos_drm_crtc *crtc, unsigned int zpos);
> + void (*update_plane)(struct exynos_drm_crtc *crtc,
> + struct exynos_drm_plane *plane);
> + void (*disable_plane)(struct exynos_drm_crtc *crtc,
> + struct exynos_drm_plane *plane);
> void (*te_handler)(struct exynos_drm_crtc *crtc);
> void (*clock_enable)(struct exynos_drm_crtc *crtc, bool enable);
> };
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> index e941f2a..6073b61 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -638,21 +638,14 @@ static void fimd_shadow_protect_win(struct fimd_context *ctx,
> writel(val, ctx->regs + reg);
> }
>
> -static void fimd_update_plane(struct exynos_drm_crtc *crtc, unsigned int win)
> +static void fimd_update_plane(struct exynos_drm_crtc *crtc,
> + struct exynos_drm_plane *plane)
> {
> struct fimd_context *ctx = crtc->ctx;
> - struct exynos_drm_plane *plane;
> dma_addr_t dma_addr;
> unsigned long val, size, offset;
> unsigned int last_x, last_y, buf_offsize, line_size;
> -
> - if (ctx->suspended)
> - return;
Don't remove this.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-07-02 12:38 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-23 21:35 [PATCH 00/23] drm/exynos: atomic improvements + exynos_encoder removal Gustavo Padovan
2015-06-23 21:35 ` [PATCH 01/23] drm/exynos: pass the correct pipe number Gustavo Padovan
2015-06-23 21:35 ` [PATCH 02/23] drm/exynos: calculate vrefresh instead of use a fixed value Gustavo Padovan
2015-07-02 12:38 ` Joonyoung Shim
2015-07-02 21:18 ` Gustavo Padovan
2015-06-23 21:35 ` [PATCH 03/23] drm/exynos: use KMS version of DRM vblanks functions Gustavo Padovan
2015-06-23 21:35 ` [PATCH 04/23] drm/exynos: remove duplicated check for suspend Gustavo Padovan
2015-06-23 21:35 ` [PATCH 05/23] drm/exynos: Kconfig: select DP if FIMD or DECON are selected Gustavo Padovan
2015-06-24 10:00 ` Andrzej Hajda
2015-06-24 13:59 ` Gustavo Padovan
2015-06-23 21:35 ` [PATCH 06/23] drm/exynos: add atomic asynchronous commit Gustavo Padovan
2015-06-23 21:35 ` [PATCH 07/23] drm/exynos: rename win_commit/disable to atomic-like names Gustavo Padovan
2015-06-23 21:35 ` [PATCH 08/23] drm/exynos: pass struct exynos_drm_plane in update/enable Gustavo Padovan
2015-07-02 12:38 ` Joonyoung Shim [this message]
2015-06-23 21:35 ` [PATCH 09/23] drm/exynos: use drm atomic state directly Gustavo Padovan
2015-06-23 21:35 ` [PATCH 10/23] drm/exynos: remove unused fields from struct exynos_drm_plane Gustavo Padovan
2015-06-23 21:35 ` [PATCH 11/23] drm/exynos: unify exynos_drm_plane names with drm core Gustavo Padovan
2015-06-23 21:35 ` [PATCH 12/23] drm/exynos: don't track enabled state at exynos_crtc Gustavo Padovan
2015-07-02 12:39 ` Joonyoung Shim
2015-06-23 21:35 ` [PATCH 13/23] drm/exynos: split display's .dpms() into .enable() and .disable() Gustavo Padovan
2015-06-23 21:35 ` [PATCH 14/23] drm/exynos: remove wrappers for phy_power_{on,off} Gustavo Padovan
2015-06-23 21:35 ` [PATCH 15/23] drm/exynos: remove unused .remove() and .check_mode() ops from display Gustavo Padovan
2015-06-23 21:35 ` [PATCH 16/23] drm/exynos: simplify calculation of possible CRTCs Gustavo Padovan
2015-06-23 21:35 ` [PATCH 17/23] drm/exynos: remove struct exynos_drm_display Gustavo Padovan
2015-06-23 21:35 ` [PATCH 18/23] drm/exynos: remove extra call to hdmi_commit() Gustavo Padovan
2015-06-23 21:35 ` [PATCH 19/23] drm/exynos: remove extra call to exynos_dp_commit() Gustavo Padovan
2015-07-02 12:39 ` Joonyoung Shim
2015-07-03 9:00 ` Joonyoung Shim
2015-06-23 21:35 ` [PATCH 20/23] drm/exynos: remove exynos_encoder's .commit() op Gustavo Padovan
2015-06-23 21:35 ` [PATCH 21/23] drm/exynos: remove exynos_drm_create_enc_conn() Gustavo Padovan
2015-06-23 21:35 ` [PATCH 22/23] drm/exynos: fold encoder setup into exynos_drm_load() Gustavo Padovan
2015-06-23 21:35 ` [PATCH 23/23] drm/exynos: remove struct exynos_drm_encoder layer Gustavo Padovan
2015-07-02 12:40 ` [PATCH 00/23] drm/exynos: atomic improvements + exynos_encoder removal Joonyoung Shim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=559530DE.6060008@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=gustavo@padovan.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=tjakobi@math.uni-bielefeld.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.