[PATCH] drm/tegra: Select root window for event dispatch

Thierry Reding thierry.reding at gmail.com
Wed Dec 17 06:35:41 PST 2014


On Wed, Nov 19, 2014 at 01:04:49PM -0500, Sean Paul wrote:
> In finish pageflip, the driver was not selecting the root
> window when dispatching events. This exposed a race where
> a plane update would change the window selection and cause
> tegra_dc_finish_page_flip to check the wrong base address.
> 
> This patch also protects access to the window selection register
> as well as the registers affected by it.
> 
> Signed-off-by: Sean Paul <seanpaul at chromium.org>
> ---
>  drivers/gpu/drm/tegra/dc.c | 20 +++++++++++++++++---
>  1 file changed, 17 insertions(+), 3 deletions(-)

I had hoped to be done with the conversion to atomic modesetting by now
at which point this patch would become significantly different. But I've
applied it to the fixes branch now and rebased the atomic modesetting
patches on top since it'll take a while longer for those to be ready.

Note also that we should be able to get rid of this spinlock by using
the per-window registers directly. As I understand it the window select
register is the legacy way of programming windows. There is also a
flattened address space available for them. According to the TRM these
are located at:

	0x0a00: window A
	0x0c00: window B
	0x0e00: window C

Supporting that would require a larger rewrite, but I think it'd be a
good idea to do that at some point to avoid the spinlock.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141217/c87d159f/attachment.sig>


More information about the dri-devel mailing list