Re: [PATCH 1/2] drm/komeda: Add basic support for D77

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

 



Hi Tiannan,

Thanks for the patch.

On Wednesday, 11 December 2019 10:30:09 GMT Tiannan Zhu (Arm Technology China) wrote:
> Make komeda driver can recongise D77, D77 is arm latest display
> product, compare with D71, D77 support some new features:
> 1. Crossbar: adjust every plane's zorder
> 2. ATU: Asynchronous Timewarp Unit, which is used to support VR/AR

I don't think the new features listing is relevant for this patch. I'd just
put a simple wording along the lines of:

Add D77 support via a new DT compatible string. The existing code is
sufficient for basic bring-up.

> 
> Signed-off-by: Tiannan Zhu (Arm Technology China) <tiannan.zhu@xxxxxxx>
> ---
>  .../gpu/drm/arm/display/include/malidp_product.h  |  1 +
>  .../drm/arm/display/komeda/d71/d71_component.c    | 15 +++++++++++++++
>  drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c  |  1 +
>  drivers/gpu/drm/arm/display/komeda/d71/d71_regs.h |  4 ++++
>  drivers/gpu/drm/arm/display/komeda/komeda_drv.c   |  1 +
>  5 files changed, 22 insertions(+)
> 
> diff --git a/drivers/gpu/drm/arm/display/include/malidp_product.h b/drivers/gpu/drm/arm/display/include/malidp_product.h
> index dbd3d4765065..cbde47f06c9f 100644
> --- a/drivers/gpu/drm/arm/display/include/malidp_product.h
> +++ b/drivers/gpu/drm/arm/display/include/malidp_product.h
> @@ -19,6 +19,7 @@
>  
>  /* Mali-display product IDs */
>  #define MALIDP_D71_PRODUCT_ID	0x0071
> +#define MALIDP_D77_PRODUCT_ID	0x0072
>  #define MALIDP_D32_PRODUCT_ID	0x0032
>  
>  union komeda_config_id {
> diff --git a/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c b/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c
> index c7f7e9c545c7..ec96b69a5ade 100644
> --- a/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c
> +++ b/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c
> @@ -1347,6 +1347,21 @@ int d71_probe_block(struct d71_dev *d71,
>  		d71->glb_scl_coeff_addr[blk_id] = reg;
>  		break;
>  
> +	case D71_BLK_TYPE_GLB_SC_COEFF:
> +		break;
> +
> +	case D77_BLK_TYPE_CBU:
> +		break;
> +
> +	case D77_BLK_TYPE_ATU:
> +		break;
> +
> +	case D77_BLK_TYPE_ATU_VP:
> +		break;
> +
> +	case D77_BLK_TYPE_LPU_PERF:
> +		break;
> +

I'd omit this from the basic enablement patch since it's effectively dead
code. Add it when you need it.

>  	default:
>  		DRM_ERROR("Unknown block (block_info: 0x%x) is found\n",
>  			  blk->block_info);
> diff --git a/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c b/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c
> index 2d429e310e5b..7598e4856e0c 100644
> --- a/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c
> +++ b/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c
> @@ -614,6 +614,7 @@ d71_identify(u32 __iomem *reg_base, struct komeda_chip_info *chip)
>  	switch (product_id) {
>  	case MALIDP_D71_PRODUCT_ID:
>  	case MALIDP_D32_PRODUCT_ID:
> +	case MALIDP_D77_PRODUCT_ID:
>  		funcs = &d71_chip_funcs;
>  		break;
>  	default:
> diff --git a/drivers/gpu/drm/arm/display/komeda/d71/d71_regs.h b/drivers/gpu/drm/arm/display/komeda/d71/d71_regs.h
> index 81de6a23e7f3..01ea53918cf1 100644
> --- a/drivers/gpu/drm/arm/display/komeda/d71/d71_regs.h
> +++ b/drivers/gpu/drm/arm/display/komeda/d71/d71_regs.h
> @@ -477,8 +477,11 @@ enum d71_blk_type {
>  	D71_BLK_TYPE_PERIPH		= 0x08,
>  	D71_BLK_TYPE_LPU_TRUSTED	= 0x09,
>  	D71_BLK_TYPE_AEU_TRUSTED	= 0x0A,
> +	D77_BLK_TYPE_CBU		= 0x0B,
> +	D77_BLK_TYPE_ATU		= 0x0C,
>  	D71_BLK_TYPE_LPU_LAYER		= 0x10,
>  	D71_BLK_TYPE_LPU_WB_LAYER	= 0x11,
> +	D77_BLK_TYPE_LPU_PERF		= 0x12,
>  	D71_BLK_TYPE_CU_SPLITTER	= 0x20,
>  	D71_BLK_TYPE_CU_SCALER		= 0x21,
>  	D71_BLK_TYPE_CU_MERGER		= 0x22,
> @@ -487,6 +490,7 @@ enum d71_blk_type {
>  	D71_BLK_TYPE_DOU_FT_COEFF	= 0x32,
>  	D71_BLK_TYPE_AEU_DS		= 0x40,
>  	D71_BLK_TYPE_AEU_AES		= 0x41,
> +	D77_BLK_TYPE_ATU_VP		= 0xC0,

Same for all these block types.

>  	D71_BLK_TYPE_RESERVED		= 0xFF
>  };
>  
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
> index ad38bbc7431e..3ac6b43beb2c 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
> @@ -126,6 +126,7 @@ static int komeda_platform_remove(struct platform_device *pdev)
>  static const struct of_device_id komeda_of_match[] = {
>  	{ .compatible = "arm,mali-d71", .data = d71_identify, },
>  	{ .compatible = "arm,mali-d32", .data = d71_identify, },
> +	{ .compatible = "arm,mali-d77", .data = d71_identify, },
>  	{},
>  };
>  
> 


-- 
Mihail



_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[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