lkml.org 
[lkml]   [2022]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] drm/sun4i: Fix blend route/enable register corruption for DE2.0/DE3.0
Hi Maxime,

пн, 30 мая 2022 г. в 16:22, Maxime Ripard <maxime@cerno.tech>:
>
> Hi Roman,
>
> On Wed, May 25, 2022 at 11:54:45AM +0000, Roman Stratiienko wrote:
> > By this commit 2 related issues are solved:
> >
> > Issue #1. Corruption in blend route/enable register:
> >
> > Register corruption happens after using old_state->zpos to disable layer
> > state. Blend route/enable registers are shared with other layers
> > and other layers may have already assigned this PIPE to valid value.
> >
> > Solution: Do not use old_state->zpos to disable the plane pipe in
> > blend registers.
> >
> > Issue #2. Remove disabled layer from blend route/enable registers:
> >
> > Since sun4i/drm are using normalized_zpos, .atomic_update() will setup
> > blend route/enable pipes starting from PIPE0 to PIPEX, where X+1 is a
> > number of layers used by the CRTC in this frame.
> >
> > Remaining pipes (PIPE[X+1] - PIPE[MAX]) can have old data that MUST be
> > updated.
> >
> > new_state->normalized_zpos can't be used, since drm helpers won't update
> > it for disabled planes.
> >
> > Solution:
> >
> > 1. Track the number of total used planes for crtc.
> > 2. Use this number instead of zpos to disable unused blend pipes.
> >
> > Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
>
> If there's two issues, and two solutions, it should be two patches.

I would say.. It's a single complex issue.
Solving one part without solving another will make things only worse.

>
> Maxime

\
 
 \ /
  Last update: 2022-05-30 16:29    [W:0.045 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site