Re: [PATCH 3/4] drm/imx: add FB modifier support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Mittwoch, den 03.05.2017, 18:15 +0100 schrieb Daniel Stone:
> Hi Lucas,
> 
> On 3 May 2017 at 17:28, Lucas Stach <l.stach@xxxxxxxxxxxxxx> wrote:
> >         int available_pres = ipu_prg_max_active_channels();
> >         int i;
> >
> > +       /*
> > +        * We are going over the planes in 2 passes: first we assign PREs to
> > +        * planes with a tiling modifier, which need the PREs to resolve into
> > +        * linear. Any failure to assign a PRE there is fatal. In the second
> > +        * pass we try to assign PREs to linear FBs, to improve memory access
> > +        * patterns for them. Failure at this point is non-fatal, as we can
> > +        * scan out linear FBs without a PRE.
> > +        */
> >         for_each_plane_in_state(state, plane, plane_state, i) {
> > -               struct ipu_plane_state *ipu_state =
> > -                               to_ipu_plane_state(plane_state);
> > -               struct ipu_plane *ipu_plane = to_ipu_plane(plane);
> > +               ipu_state = to_ipu_plane_state(plane_state);
> > +               ipu_plane = to_ipu_plane(plane);
> > +
> > +               if (!plane_state->fb) {
> > +                       ipu_state->use_pre = false;
> > +                       continue;
> > +               }
> > +
> > +               if (!(plane_state->fb->flags & DRM_MODE_FB_MODIFIERS) ||
> > +                   plane_state->fb->modifier == DRM_FORMAT_MOD_LINEAR)
> > +                       continue;
> > +
> > +               if (!ipu_prg_present(ipu_plane->ipu) || !available_pres)
> > +                       return -EINVAL;
> 
> What about planes which aren't present in this commit, but are still
> taking up a PRE unit? Will they have their PRE stolen, or am I missing
> something?

Yes, the plane->PRE assignment is configurable by matching different AXI
IDs in the PRG. So what's happening here is that we basically construct
a new assignment for each commit. Planes without a assigned PRE will
revert back to pass-through mode in the PRG on plane commit or plane
disable.

Regards,
Lucas

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux