drm: panel-orientation-quirks: Add quirk for Aya Neo Next
Subsystems (2)
PATCH 1/1 drm: panel-orientation-quirks: Add quirk for Aya Neo Next
From: Maya Matuszczyk <[email protected]>
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.
--- .../gpu/drm/drm_panel_orientation_quirks.c | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+)
drivers/gpu/drm/drm_panel_orientation_quirks.c +36 -0
@@ -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, + }, { /* 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"),
Signature · 1 line
2.36.1
Hi Maya,
Quoted 19 lines · On 6/11/22 12:39, Maccraft123 wrote:
From: Maya Matuszczyk <[email protected]>
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 <[email protected]>--- .../gpu/drm/drm_panel_orientation_quirks.c | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+)drivers/gpu/drm/drm_panel_orientation_quirks.c +0
-0
drivers/gpu/drm/drm_panel_orientation_quirks.c static const struct dmi_system_id orientation_data[] = { · line 161
Quoted 10 lines
drivers/gpu/drm/drm_panel_orientation_quirks.c +7
-0@@ -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"),
Thanks & Regards,
Hans
{ /* AYA NEO NEXT Advance */
Quoted 32 lines
drivers/gpu/drm/drm_panel_orientation_quirks.c +29
-0+ .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"),
sob., 18 cze 2022 o 22:57 Hans de Goede <[email protected]> napisał(a):
Quoted 46 lines
Hi Maya,
Quoted 19 lines · On 6/11/22 12:39, Maccraft123 wrote:
From: Maya Matuszczyk <[email protected]>
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 <[email protected]>--- .../gpu/drm/drm_panel_orientation_quirks.c | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+)drivers/gpu/drm/drm_panel_orientation_quirks.c +0
-0drivers/gpu/drm/drm_panel_orientation_quirks.c static const struct dmi_system_id orientation_data[] = { · line 161
Quoted 10 lines
drivers/gpu/drm/drm_panel_orientation_quirks.c +7
-0@@ -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 usingDMI_BOARD_NAMEas the haystack and "NEXT" as the needle.
Quoted 7 lines
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.
Quoted 40 lines
Thanks & Regards,
Hans
{ /* AYA NEO NEXT Advance */
Quoted 32 lines
drivers/gpu/drm/drm_panel_orientation_quirks.c +29
-0+ .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"),
Hi,
Quoted 50 lines · Maya Matuszczyk
sob., 18 cze 2022 o 22:57 Hans de Goede <[email protected]> napisał(a):
Quoted 49 lines
Hi Maya,
Quoted 19 lines · On 6/11/22 12:39, Maccraft123 wrote:
From: Maya Matuszczyk <[email protected]>
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 <[email protected]>--- .../gpu/drm/drm_panel_orientation_quirks.c | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+)drivers/gpu/drm/drm_panel_orientation_quirks.c +0
-0drivers/gpu/drm/drm_panel_orientation_quirks.c static const struct dmi_system_id orientation_data[] = { · line 161
Quoted 10 lines
drivers/gpu/drm/drm_panel_orientation_quirks.c +7
-0@@ -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 usingDMI_BOARD_NAMEas the haystack and "NEXT" as the needle.And since all 6 board-names contain "NEXT", this single entry will then match all 6 variants.
Quoted 7 lines
Quoted 4 lines
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.
Hmm, I understand but I'm not sure what is the best thing to do.
There also is the resolution check. So if a new "NEXT 2" is released then this really only is an issue if it too uses a 800x1280 screen, but then with its left-side-up.
If it uses a normal landscape 1280x800 screen the resolution won't match the 800x1280 the quirk checks for so nothing happens.
If it again uses a 800x1280 portrait screen in landscape mode with its right-side-up then the quirk matching actualy is a good thing.
So the only bad scenario is a 800x1280 screen which is left-side-up, which the quirk will then turn from being on its side to being upside-down. The question then is though if upside-down is much worse then on its side, neither is really usable, so we would need a quirk for this screen then anyways...
So I understand where you are coming from, but I see the chances of this becoming a problem as pretty small (and we can fix it when it does happen). OTOH the dmi_system_id table we are discussing is almost always built into the vmlinuz image. So growing it will cause extra disk/RAM uses for every Linux user out there (not just Aya Neo Next users).
So IMHO going with only using 1 entry with the small risc of needing to revisit this later is the better solution here.
Regards,
Hans
Quoted 43 lines
Quoted 42 lines
Thanks & Regards,
Hans
{ /* AYA NEO NEXT Advance */
Quoted 32 lines
drivers/gpu/drm/drm_panel_orientation_quirks.c +29
-0+ .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"),