public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Peter Rosin <peda@axentia.se>
Cc: linux-kernel@vger.kernel.org, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	dri-devel@lists.freedesktop.org
Subject: Re: [RFC PATCH 1/3] atmel-hlcdc: add support for 8-bit color lookup table mode
Date: Sat, 17 Jun 2017 07:36:03 +0200	[thread overview]
Message-ID: <20170617073603.40564353@bbrezillon> (raw)
In-Reply-To: <88384c85-6115-6833-663c-6e9ca802d867@axentia.se>

Le Sat, 17 Jun 2017 00:46:12 +0200,
Peter Rosin <peda@axentia.se> a écrit :

> >>>> Hm, it's probably too late to do it here. Planes have already been
> >>>> enabled and the engine may have started to fetch data and do the
> >>>> composition. You could do that in ->update_plane() [1], and make it a
> >>>> per-plane thing.
> >>>>
> >>>> I'm not sure, but I think you can get the new crtc_state from
> >>>> plane->crtc->state in this context (state have already been swapped,
> >>>> and new state is being applied, which means relevant locks are held).    
> >>>
> >>> Ok, I can move it there. My plan is to just copy the default .update_plane
> >>> function and insert 
> >>>
> >>> 	if (crtc->state->color_mgmt_changed && crtc->state->gamma_lut) {
> >>> 		...
> >>> 	}
> >>>
> >>> just before the drm_atomic_commit(state) call. Sounds ok?  
> >>
> >> Why would you copy the default ->update_plane() when we already have
> >> our own ->atomic_update_plane() implementation [1]? Just put it there
> >> (before the atmel_hlcdc_layer_update_commit() call) and we should be
> >> good.  
> > 
> > Ahh, but you said ->update_plane() and I took that as .update_plane in
> > layer_plane_funcs, not ->atomic_update() in atmel_hlcdc_layer_plane_helper_funcs.
> > 
> > Makes sense now, and much neater too.  
> 
> No, it doesn't make sense. There's no atmel_hlcdc_layer_update_commit call
> anywhere, and no such function. You seem to have some further changes that
> are not even in -next. Where am I getting those changes and why are they
> not upstream yet?

My bad, this part as been reworked in 4.12 and I was reading 4.11 code.
Indeed, atmel_hlcdc_layer_update_commit() no longer exists, but
atmel_hlcdc_plane_atomic_update() does.

Just add a function called atmel_hlcdc_plane_update_clut() in
atmel_hlcdc_plane.c and call it just after [1].

[1]http://elixir.free-electrons.com/linux/v4.12-rc5/source/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c#L770

  reply	other threads:[~2017-06-17  5:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16  9:12 [RFC PATCH 0/3] drm: atmel-hlcdc: clut support Peter Rosin
2017-06-16  9:12 ` [RFC PATCH 1/3] atmel-hlcdc: add support for 8-bit color lookup table mode Peter Rosin
2017-06-16 10:01   ` Boris Brezillon
2017-06-16 15:54     ` Peter Rosin
2017-06-16 16:15       ` Boris Brezillon
2017-06-16 21:12         ` Peter Rosin
2017-06-16 22:25           ` Peter Rosin
2017-06-16 22:46           ` Peter Rosin
2017-06-17  5:36             ` Boris Brezillon [this message]
2017-06-17 17:51               ` Peter Rosin
2017-06-16  9:12 ` [RFC PATCH 2/3] drm/fb-cma-helper: expose more of fb cma guts Peter Rosin
2017-06-16  9:12 ` [RFC PATCH 3/3] atmel-hlcdc: add clut support for legacy fbdev Peter Rosin

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=20170617073603.40564353@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=seanpaul@chromium.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox