drm: panel-orientation-quirks: Add quirk for Aya Neo Next
Maya Matuszczyk
maccraft123mc at gmail.com
Sat Jun 18 21:08:13 UTC 2022
sob., 18 cze 2022 o 22:57 Hans de Goede <hdegoede at redhat.com> napisał(a):
>
> Hi Maya,
>
> On 6/11/22 12:39, Maccraft123 wrote:
> > From: Maya Matuszczyk <maccraft123mc at gmail.com>
> >
> > The device is identified by "NEXT" in board name, however there are
> > different versions of it, "Next Advance" and "Next Pro", that have
> > different DMI board names.
> > Due to a production error a batch or two have their board names prefixed
> > by "AYANEO" and that's how we ended up with 6 different entries for
> > what's basically one device with different hardware specifications.
> >
> > Signed-off-by: Maya Matuszczyk <maccraft123mc at gmail.com>
> > ---
> > .../gpu/drm/drm_panel_orientation_quirks.c | 36 +++++++++++++++++++
> > 1 file changed, 36 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
> > index 4e853acfd1e8..62fc7eb69341 100644
> > --- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
> > +++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
> > @@ -152,6 +152,42 @@ static const struct dmi_system_id orientation_data[] = {
> > DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYA NEO 2021"),
> > },
> > .driver_data = (void *)&lcd800x1280_rightside_up,
> > + }, { /* AYA NEO NEXT */
> > + .matches = {
> > + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> > + DMI_EXACT_MATCH(DMI_BOARD_NAME, "NEXT"),
> > + },
> > + .driver_data = (void *)&lcd800x1280_rightside_up,
> > + },
>
> If you change:
>
> DMI_EXACT_MATCH(DMI_BOARD_NAME, "NEXT"),
>
> to:
>
> DMI_MATCH(DMI_BOARD_NAME, "NEXT"),
>
> Then the matching code will do a substring search for "NEXT"
> in DMI_BOARD_NAME. IOW it will do a strstr using DMI_BOARD_NAME
> as the haystack and "NEXT" as the needle.
>
> And since all 6 board-names contain "NEXT", this single entry
> will then match all 6 variants.
>
> So please respin this patch using just a single entry with:
>
> DMI_MATCH(DMI_BOARD_NAME, "NEXT"),
>
I considered this and decided against it because if "Aya Neo Next 2" was
released it would likely have "NEXT 2" as DMI board name, and if it had
screen rotated differently this patch would rotate it in a wrong way.
> Thanks & Regards,
>
> Hans
>
>
>
> { /* AYA NEO NEXT Advance */
> > + .matches = {
> > + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> > + DMI_EXACT_MATCH(DMI_BOARD_NAME, "NEXT Advance"),
> > + },
> > + .driver_data = (void *)&lcd800x1280_rightside_up,
> > + }, { /* AYA NEO NEXT Pro */
> > + .matches = {
> > + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> > + DMI_EXACT_MATCH(DMI_BOARD_NAME, "NEXT Pro"),
> > + },
> > + .driver_data = (void *)&lcd800x1280_rightside_up,
> > + }, { /* AYA NEO NEXT (Batch with different board name) */
> > + .matches = {
> > + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> > + DMI_EXACT_MATCH(DMI_BOARD_NAME, "AYANEO NEXT"),
> > + },
> > + .driver_data = (void *)&lcd800x1280_rightside_up,
> > + }, { /* AYA NEO NEXT Advance (Batch with different board name) */
> > + .matches = {
> > + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> > + DMI_EXACT_MATCH(DMI_BOARD_NAME, "AYANEO NEXT Advance"),
> > + },
> > + .driver_data = (void *)&lcd800x1280_rightside_up,
> > + }, { /* AYA NEO NEXT Pro (Batch with different board name) */
> > + .matches = {
> > + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> > + DMI_EXACT_MATCH(DMI_BOARD_NAME, "AYANEO NEXT Pro"),
> > + },
> > + .driver_data = (void *)&lcd800x1280_rightside_up,
> > }, { /* Chuwi HiBook (CWI514) */
> > .matches = {
> > DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
>
More information about the dri-devel
mailing list