diff mbox series

[17/21] drm: mxsfb: Update internal IP version number for i.MX6SX

Message ID 20200309195216.31042-18-laurent.pinchart@ideasonboard.com (mailing list archive)
State New, archived
Headers show
Series drm: mxsfb: Add i.MX7 support | expand

Commit Message

Laurent Pinchart March 9, 2020, 7:52 p.m. UTC
The LCDIF present in the i.MX6SX has extra features compared to
the i.MX28. It has however lost its IP version register, so no official
version number is known. Bump the version to MXSFB_V6 following the i.MX
version, in preparation for support for the additional features.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

Comments

Stefan Agner March 23, 2020, 11:20 p.m. UTC | #1
On 2020-03-09 20:52, Laurent Pinchart wrote:
> The LCDIF present in the i.MX6SX has extra features compared to
> the i.MX28. It has however lost its IP version register, so no official
> version number is known. Bump the version to MXSFB_V6 following the i.MX
> version, in preparation for support for the additional features.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Stefan Agner <stefan@agner.ch>

> ---
>  drivers/gpu/drm/mxsfb/mxsfb_drv.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> index 7c9a041f5f6d..2316c12c5c42 100644
> --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> @@ -35,6 +35,11 @@
>  enum mxsfb_devtype {
>  	MXSFB_V3,
>  	MXSFB_V4,
> +	/*
> +	 * Starting at i.MX6 the hardware version register is gone, use the
> +	 * i.MX family number as the version.
> +	 */
> +	MXSFB_V6,
>  };
>  
>  static const struct mxsfb_devdata mxsfb_devdata[] = {
> @@ -52,6 +57,13 @@ static const struct mxsfb_devdata mxsfb_devdata[] = {
>  		.hs_wdth_mask	= 0x3fff,
>  		.hs_wdth_shift	= 18,
>  	},
> +	[MXSFB_V6] = {
> +		.transfer_count	= LCDC_V4_TRANSFER_COUNT,
> +		.cur_buf	= LCDC_V4_CUR_BUF,
> +		.next_buf	= LCDC_V4_NEXT_BUF,
> +		.hs_wdth_mask	= 0x3fff,
> +		.hs_wdth_shift	= 18,
> +	},
>  };
>  
>  void mxsfb_enable_axi_clk(struct mxsfb_drm_private *mxsfb)
> @@ -279,7 +291,7 @@ static struct drm_driver mxsfb_driver = {
>  static const struct platform_device_id mxsfb_devtype[] = {
>  	{ .name = "imx23-fb", .driver_data = MXSFB_V3, },
>  	{ .name = "imx28-fb", .driver_data = MXSFB_V4, },
> -	{ .name = "imx6sx-fb", .driver_data = MXSFB_V4, },
> +	{ .name = "imx6sx-fb", .driver_data = MXSFB_V6, },
>  	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(platform, mxsfb_devtype);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index 7c9a041f5f6d..2316c12c5c42 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -35,6 +35,11 @@ 
 enum mxsfb_devtype {
 	MXSFB_V3,
 	MXSFB_V4,
+	/*
+	 * Starting at i.MX6 the hardware version register is gone, use the
+	 * i.MX family number as the version.
+	 */
+	MXSFB_V6,
 };
 
 static const struct mxsfb_devdata mxsfb_devdata[] = {
@@ -52,6 +57,13 @@  static const struct mxsfb_devdata mxsfb_devdata[] = {
 		.hs_wdth_mask	= 0x3fff,
 		.hs_wdth_shift	= 18,
 	},
+	[MXSFB_V6] = {
+		.transfer_count	= LCDC_V4_TRANSFER_COUNT,
+		.cur_buf	= LCDC_V4_CUR_BUF,
+		.next_buf	= LCDC_V4_NEXT_BUF,
+		.hs_wdth_mask	= 0x3fff,
+		.hs_wdth_shift	= 18,
+	},
 };
 
 void mxsfb_enable_axi_clk(struct mxsfb_drm_private *mxsfb)
@@ -279,7 +291,7 @@  static struct drm_driver mxsfb_driver = {
 static const struct platform_device_id mxsfb_devtype[] = {
 	{ .name = "imx23-fb", .driver_data = MXSFB_V3, },
 	{ .name = "imx28-fb", .driver_data = MXSFB_V4, },
-	{ .name = "imx6sx-fb", .driver_data = MXSFB_V4, },
+	{ .name = "imx6sx-fb", .driver_data = MXSFB_V6, },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(platform, mxsfb_devtype);