Re: [PATCH 4/4] drm: rcar-du: Add support for R8A779H0

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

 



Hi Laurent, Jacopo,

On Wed, Jun 19, 2024 at 9:46 PM Laurent Pinchart
<laurent.pinchart@xxxxxxxxxxxxxxxx> wrote:
> On Wed, Jun 19, 2024 at 12:22:18PM +0200, Jacopo Mondi wrote:
> > Add support for R-Car R8A779H0 V4M which has similar characteristics
> > as the already supported R-Car V4H R8A779G0, but with a single output
> > channel.
> >
> > Signed-off-by: Jacopo Mondi <jacopo.mondi@xxxxxxxxxxxxxxxx>

> > --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_group.c
> > +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_group.c
> > @@ -185,11 +187,16 @@ static void rcar_du_group_setup(struct rcar_du_group *rgrp)
> >               dorcr |= DORCR_PG1T | DORCR_DK1S | DORCR_PG1D_DS1;
> >       rcar_du_group_write(rgrp, DORCR, dorcr);
> >
> > -     /* Apply planes to CRTCs association. */
> > -     mutex_lock(&rgrp->lock);
> > -     rcar_du_group_write(rgrp, DPTSR, (rgrp->dptsr_planes << 16) |
> > -                         rgrp->dptsr_planes);
> > -     mutex_unlock(&rgrp->lock);
> > +     /*
> > +      * Apply planes to CRTCs association, skip for V4M which has a single
> > +      * channel.
>
> " and doesn't implement the DPTSR register."
>
> I'm pretty sure writing it is still harmless, but...
>
> > +      */
> > +     if (rcdu->info->gen < 4 || rgrp->num_crtcs > 1) {

Looking at the R-Car Gen3 docs, this check seems to be wrong, and the
lack of a check might have been an issue before?

Seems like the register (per pair) is only present if the second CRTC
of a CRTC pair is present, so R-Car V3M and V3H (single CRTC) do not
have DPTSR at all, and M3-W (triple CRTC) does not have it on the
second pair.  M3-N does have both, as it lacks the first CRTC of
second pair, but does have the second CRTC of the second pair.

> > +             mutex_lock(&rgrp->lock);
> > +             rcar_du_group_write(rgrp, DPTSR, (rgrp->dptsr_planes << 16) |
> > +                                 rgrp->dptsr_planes);
> > +             mutex_unlock(&rgrp->lock);
> > +     }
> >  }

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux