Re: [PATCH] drm/panel: Fix panel mode type setting logic

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

 



On Tue, Mar 14, 2023 at 10:12:02AM -0700, Doug Anderson wrote:
> Hi,
> 
> On Tue, Mar 14, 2023 at 4:45 AM Jianhua Lu <lujianhua000@xxxxxxxxx> wrote:
> >
> > Some panels set mode type to DRM_MODE_TYPE_PREFERRED by the number
> > of modes. It isn't reasonable, so set the first mode type to
> > DRM_MODE_TYPE_PREFERRED. This should be more reasonable.
> >
> > Signed-off-by: Jianhua Lu <lujianhua000@xxxxxxxxx>
> > ---
> >  drivers/gpu/drm/panel/panel-abt-y030xx067a.c     | 2 +-
> >  drivers/gpu/drm/panel/panel-auo-a030jtn01.c      | 2 +-
> >  drivers/gpu/drm/panel/panel-edp.c                | 4 ++--
> >  drivers/gpu/drm/panel/panel-innolux-ej030na.c    | 2 +-
> >  drivers/gpu/drm/panel/panel-newvision-nv3051d.c  | 2 +-
> >  drivers/gpu/drm/panel/panel-newvision-nv3052c.c  | 2 +-
> >  drivers/gpu/drm/panel/panel-novatek-nt35950.c    | 2 +-
> >  drivers/gpu/drm/panel/panel-novatek-nt39016.c    | 2 +-
> >  drivers/gpu/drm/panel/panel-orisetech-ota5601a.c | 2 +-
> >  drivers/gpu/drm/panel/panel-seiko-43wvf1g.c      | 4 ++--
> >  drivers/gpu/drm/panel/panel-simple.c             | 4 ++--
> >  11 files changed, 14 insertions(+), 14 deletions(-)
> 
> Can you explain more about your motivation here? At least for
This demonstrates a bad way to set DRM_MODE_TYPE_PREFERRED for panels
with more than one mode. It mislead the future contributors to send
a patch with this piece of code. There is also a discussion for it.
https://lore.kernel.org/lkml/904bc493-7160-32fd-9709-1dcb978ddbab@xxxxxxxxxx/
> panel-edp and panel-simple it seems like it would be better to leave
> the logic alone and manually add DRM_MODE_TYPE_PREFERRED to the right
> mode for the rare panel that actually has more than one mode listed.
I think we can order it to the first mode if the mode type should be
DRM_MODE_TYPE_PREFERRED, It's also same.
> That feels more explicit to me.
> 
> -Doug



[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