All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jyri Sarha <jsarha@ti.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/6] drm/omap: remove ovl_set_channel_out
Date: Mon, 08 May 2017 17:26:53 +0300	[thread overview]
Message-ID: <4223934.2e5CMlyr0e@avalon> (raw)
In-Reply-To: <1493288874-26654-4-git-send-email-tomi.valkeinen@ti.com>

Hi Tomi,

Thank you for the patch.

On Thursday 27 Apr 2017 13:27:51 Tomi Valkeinen wrote:
> At the moment we have ovl_set_channel_out() to configure the output
> channel of an overlay. It makes sense to have this configuration as part
> of the reset of overlay configuration, and in DSS6+ we need the output

Do you mean s/reset/rest/ ?

> channel when doing the other overlay configuration.
> 
> This patch adds 'channel' parameter to ovl_setup(), so that all overlay

s/adds/adds a/

> configuration is done via the same function, and removes the
> ovl_set_channel_out().
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
>  drivers/gpu/drm/omapdrm/dss/dispc.c   | 13 ++++++-------
>  drivers/gpu/drm/omapdrm/dss/omapdss.h |  3 ++-
>  drivers/gpu/drm/omapdrm/omap_plane.c  |  6 ++----
>  3 files changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c
> b/drivers/gpu/drm/omapdrm/dss/dispc.c index 9fba92973d0e..97f4a1163fbe
> 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dispc.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
> @@ -2834,21 +2834,21 @@ static int dispc_ovl_setup_common(enum omap_plane_id
> plane,
> 
>  static int dispc_ovl_setup(enum omap_plane_id plane,
>  		const struct omap_overlay_info *oi,
> -		const struct videomode *vm, bool mem_to_mem)
> +		const struct videomode *vm, bool mem_to_mem,
> +		enum omap_channel channel)
>  {
>  	int r;
>  	enum omap_overlay_caps caps = dss_feat_get_overlay_caps(plane);
> -	enum omap_channel channel;
>  	const bool replication = true;
> 
> -	channel = dispc_ovl_get_channel_out(plane);
> -
>  	DSSDBG("dispc_ovl_setup %d, pa %pad, pa_uv %pad, sw %d, %d,%d, %dx%d -
>"
>  		" %dx%d, cmode %x, rot %d, mir %d, chan %d repl %d\n",
>  		plane, &oi->paddr, &oi->p_uv_addr, oi->screen_width, oi-
>pos_x,
>  		oi->pos_y, oi->width, oi->height, oi->out_width, oi-
>out_height,
>  		oi->color_mode, oi->rotation, oi->mirror, channel, 
replication);
> 
> +	dispc_ovl_set_channel_out(plane, channel);
> +
>  	r = dispc_ovl_setup_common(plane, caps, oi->paddr, oi->p_uv_addr,
>  		oi->screen_width, oi->pos_x, oi->pos_y, oi->width, oi->height,
>  		oi->out_width, oi->out_height, oi->color_mode, oi->rotation,
> @@ -4304,8 +4304,8 @@ static void dispc_errata_i734_wa(void)
>  	REG_FLD_MOD(DISPC_CONFIG, 0x1f, 8, 4);
> 
>  	/* Setup and enable GFX plane */
> -	dispc_ovl_set_channel_out(OMAP_DSS_GFX, OMAP_DSS_CHANNEL_LCD);
> -	dispc_ovl_setup(OMAP_DSS_GFX, &ovli, &i734.vm, false);
> +	dispc_ovl_setup(OMAP_DSS_GFX, &ovli, &i734.vm, false,
> +		OMAP_DSS_CHANNEL_LCD);
>  	dispc_ovl_enable(OMAP_DSS_GFX, true);
> 
>  	/* Set up and enable display manager for LCD1 */
> @@ -4372,7 +4372,6 @@ static const struct dispc_ops dispc_ops = {
>  	.mgr_set_gamma = dispc_mgr_set_gamma,
> 
>  	.ovl_enable = dispc_ovl_enable,
> -	.ovl_set_channel_out = dispc_ovl_set_channel_out,
>  	.ovl_setup = dispc_ovl_setup,
>  	.ovl_get_color_modes = dispc_ovl_get_color_modes,
>  };
> diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h
> b/drivers/gpu/drm/omapdrm/dss/omapdss.h index d9ad33df0455..a2b9b7f29472
> 100644
> --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
> +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
> @@ -917,7 +917,8 @@ struct dispc_ops {
>  			enum omap_channel channel);

Shouldn't you also remove the .ovl_set_channel_out() operation from this 
structure ?

Apart from that,

Reviewed-by: Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  	int (*ovl_setup)(enum omap_plane_id plane,
>  			 const struct omap_overlay_info *oi,
> -			const struct videomode *vm, bool mem_to_mem);
> +			const struct videomode *vm, bool mem_to_mem,
> +			enum omap_channel channel);
> 
>  	enum omap_color_mode (*ovl_get_color_modes)(enum omap_plane_id plane);
>  };
> diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c
> b/drivers/gpu/drm/omapdrm/omap_plane.c index 9168154d749e..81d9822f6f4a
> 100644
> --- a/drivers/gpu/drm/omapdrm/omap_plane.c
> +++ b/drivers/gpu/drm/omapdrm/omap_plane.c
> @@ -118,12 +118,10 @@ static void omap_plane_atomic_update(struct drm_plane
> *plane, DBG("%d,%d %pad %pad", info.pos_x, info.pos_y,
>  			&info.paddr, &info.p_uv_addr);
> 
> -	priv->dispc_ops->ovl_set_channel_out(omap_plane->id,
> -				  omap_crtc_channel(state->crtc));
> -
>  	/* and finally, update omapdss: */
>  	ret = priv->dispc_ops->ovl_setup(omap_plane->id, &info,
> -			      omap_crtc_timings(state->crtc), false);
> +			      omap_crtc_timings(state->crtc), false,
> +			      omap_crtc_channel(state->crtc));
>  	if (ret) {
>  		dev_err(plane->dev->dev, "Failed to setup plane %s\n",
>  			omap_plane->name);

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-05-08 14:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-27 10:27 [PATCH 0/6] drm/omap: misc changes Tomi Valkeinen
2017-04-27 10:27 ` [PATCH 1/6] drm/omap: add new connector types Tomi Valkeinen
2017-05-08 14:21   ` Laurent Pinchart
2017-05-08 14:35     ` Tomi Valkeinen
2017-05-08 16:21       ` Laurent Pinchart
2017-05-09  6:57         ` Tomi Valkeinen
2017-05-09  7:16   ` [PATCH 1/6 v2] " Tomi Valkeinen
2017-05-09  7:36     ` Jyri Sarha
2017-05-09  7:41       ` Tomi Valkeinen
2017-05-09 22:35     ` Laurent Pinchart
2017-05-10  6:59       ` Tomi Valkeinen
2017-04-27 10:27 ` [PATCH 2/6] drm/omap: remove unused ovl_enabled() Tomi Valkeinen
2017-05-08 14:23   ` Laurent Pinchart
2017-04-27 10:27 ` [PATCH 3/6] drm/omap: remove ovl_set_channel_out Tomi Valkeinen
2017-05-08 14:26   ` Laurent Pinchart [this message]
2017-05-09  7:12     ` Tomi Valkeinen
2017-04-27 10:27 ` [PATCH 4/6] drm/omap: remove read_irqenable() Tomi Valkeinen
2017-05-08 14:28   ` Laurent Pinchart
2017-04-27 10:27 ` [PATCH 5/6] drm/omap: 64bit compile fixes Tomi Valkeinen
2017-05-08 14:29   ` Laurent Pinchart
2017-04-27 10:27 ` [PATCH 6/6] drm/omap: define compat_ioctl Tomi Valkeinen
2017-05-08 14:32   ` Laurent Pinchart

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=4223934.2e5CMlyr0e@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.com \
    --cc=tomi.valkeinen@ti.com \
    /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.