Re: drm: panel-orientation-quirks: Add quirk for Aya Neo Next

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

 



Hi Maya,

On 6/11/22 12:39, Maccraft123 wrote:
> From: Maya Matuszczyk <maccraft123mc@xxxxxxxxx>
> 
> 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@xxxxxxxxx>
> ---
>  .../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"),

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"),




[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