mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/panel: ili9322: Minor regmap improvements
@ 2023-10-01 10:24 Mark Brown
  2023-10-01 10:24 ` [PATCH 1/2] drm/panel: ili9322: Remove redundant volatle_reg() operation Mark Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mark Brown @ 2023-10-01 10:24 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
	Sam Ravnborg
  Cc: dri-devel, linux-kernel, Mark Brown

These two patches provide some minor improvements to the ili9322 regmap
API usage.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Mark Brown (2):
      drm/panel: ili9322: Remove redundant volatle_reg() operation
      drm/panel: ili9322: Convert to use maple tree register cache

 drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
base-commit: 6465e260f48790807eef06b583b38ca9789b6072
change-id: 20230929-drm-sn65dsi83-maple-f15042b93dcd

Best regards,
-- 
Mark Brown <broonie@kernel.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] drm/panel: ili9322: Remove redundant volatle_reg() operation
  2023-10-01 10:24 [PATCH 0/2] drm/panel: ili9322: Minor regmap improvements Mark Brown
@ 2023-10-01 10:24 ` Mark Brown
  2023-10-02  6:52   ` Neil Armstrong
  2023-10-01 10:24 ` [PATCH 2/2] drm/panel: ili9322: Convert to use maple tree register cache Mark Brown
  2023-10-02  7:11 ` [PATCH 0/2] drm/panel: ili9322: Minor regmap improvements Neil Armstrong
  2 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2023-10-01 10:24 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
	Sam Ravnborg
  Cc: dri-devel, linux-kernel, Mark Brown

The ili9322 driver has a volatile_reg() operation in it's regmap which
always returns false. This is redundant since it is the default in the
regmap core, remove the operation for a trivial code size and performance
improvement.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
index 61c872f0f7ca..15b81e5228b5 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
@@ -325,11 +325,6 @@ static struct regmap_bus ili9322_regmap_bus = {
 	.val_format_endian_default = REGMAP_ENDIAN_BIG,
 };
 
-static bool ili9322_volatile_reg(struct device *dev, unsigned int reg)
-{
-	return false;
-}
-
 static bool ili9322_writeable_reg(struct device *dev, unsigned int reg)
 {
 	/* Just register 0 is read-only */
@@ -343,7 +338,6 @@ static const struct regmap_config ili9322_regmap_config = {
 	.val_bits = 8,
 	.max_register = 0x44,
 	.cache_type = REGCACHE_RBTREE,
-	.volatile_reg = ili9322_volatile_reg,
 	.writeable_reg = ili9322_writeable_reg,
 };
 

-- 
2.39.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] drm/panel: ili9322: Convert to use maple tree register cache
  2023-10-01 10:24 [PATCH 0/2] drm/panel: ili9322: Minor regmap improvements Mark Brown
  2023-10-01 10:24 ` [PATCH 1/2] drm/panel: ili9322: Remove redundant volatle_reg() operation Mark Brown
@ 2023-10-01 10:24 ` Mark Brown
  2023-10-02  6:52   ` Neil Armstrong
  2023-10-02  7:11 ` [PATCH 0/2] drm/panel: ili9322: Minor regmap improvements Neil Armstrong
  2 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2023-10-01 10:24 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
	Sam Ravnborg
  Cc: dri-devel, linux-kernel, Mark Brown

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
index 15b81e5228b5..4a6dcfd781e8 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
@@ -337,7 +337,7 @@ static const struct regmap_config ili9322_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 	.max_register = 0x44,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.writeable_reg = ili9322_writeable_reg,
 };
 

-- 
2.39.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] drm/panel: ili9322: Remove redundant volatle_reg() operation
  2023-10-01 10:24 ` [PATCH 1/2] drm/panel: ili9322: Remove redundant volatle_reg() operation Mark Brown
@ 2023-10-02  6:52   ` Neil Armstrong
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2023-10-02  6:52 UTC (permalink / raw)
  To: Mark Brown, Andrzej Hajda, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
	Sam Ravnborg
  Cc: dri-devel, linux-kernel

On 01/10/2023 12:24, Mark Brown wrote:
> The ili9322 driver has a volatile_reg() operation in it's regmap which
> always returns false. This is redundant since it is the default in the
> regmap core, remove the operation for a trivial code size and performance
> improvement.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>   drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 6 ------
>   1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
> index 61c872f0f7ca..15b81e5228b5 100644
> --- a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
> +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
> @@ -325,11 +325,6 @@ static struct regmap_bus ili9322_regmap_bus = {
>   	.val_format_endian_default = REGMAP_ENDIAN_BIG,
>   };
>   
> -static bool ili9322_volatile_reg(struct device *dev, unsigned int reg)
> -{
> -	return false;
> -}
> -
>   static bool ili9322_writeable_reg(struct device *dev, unsigned int reg)
>   {
>   	/* Just register 0 is read-only */
> @@ -343,7 +338,6 @@ static const struct regmap_config ili9322_regmap_config = {
>   	.val_bits = 8,
>   	.max_register = 0x44,
>   	.cache_type = REGCACHE_RBTREE,
> -	.volatile_reg = ili9322_volatile_reg,
>   	.writeable_reg = ili9322_writeable_reg,
>   };
>   
> 

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] drm/panel: ili9322: Convert to use maple tree register cache
  2023-10-01 10:24 ` [PATCH 2/2] drm/panel: ili9322: Convert to use maple tree register cache Mark Brown
@ 2023-10-02  6:52   ` Neil Armstrong
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2023-10-02  6:52 UTC (permalink / raw)
  To: Mark Brown, Andrzej Hajda, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
	Sam Ravnborg
  Cc: dri-devel, linux-kernel

On 01/10/2023 12:24, Mark Brown wrote:
> The maple tree register cache is based on a much more modern data structure
> than the rbtree cache and makes optimisation choices which are probably
> more appropriate for modern systems than those made by the rbtree cache.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>   drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
> index 15b81e5228b5..4a6dcfd781e8 100644
> --- a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
> +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
> @@ -337,7 +337,7 @@ static const struct regmap_config ili9322_regmap_config = {
>   	.reg_bits = 8,
>   	.val_bits = 8,
>   	.max_register = 0x44,
> -	.cache_type = REGCACHE_RBTREE,
> +	.cache_type = REGCACHE_MAPLE,
>   	.writeable_reg = ili9322_writeable_reg,
>   };
>   
> 

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] drm/panel: ili9322: Minor regmap improvements
  2023-10-01 10:24 [PATCH 0/2] drm/panel: ili9322: Minor regmap improvements Mark Brown
  2023-10-01 10:24 ` [PATCH 1/2] drm/panel: ili9322: Remove redundant volatle_reg() operation Mark Brown
  2023-10-01 10:24 ` [PATCH 2/2] drm/panel: ili9322: Convert to use maple tree register cache Mark Brown
@ 2023-10-02  7:11 ` Neil Armstrong
  2 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2023-10-02  7:11 UTC (permalink / raw)
  To: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, David Airlie, Daniel Vetter, Sam Ravnborg,
	Mark Brown
  Cc: dri-devel, linux-kernel

Hi,

On Sun, 01 Oct 2023 11:24:12 +0100, Mark Brown wrote:
> These two patches provide some minor improvements to the ili9322 regmap
> API usage.
> 
> 

Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next)

[1/2] drm/panel: ili9322: Remove redundant volatle_reg() operation
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=c8c575ebf6daaf1fbe029cc04c845e2fad462320
[2/2] drm/panel: ili9322: Convert to use maple tree register cache
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=800c1ff7d1b12b6309eb877542367b94f376acbc

-- 
Neil


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-10-02  7:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-01 10:24 [PATCH 0/2] drm/panel: ili9322: Minor regmap improvements Mark Brown
2023-10-01 10:24 ` [PATCH 1/2] drm/panel: ili9322: Remove redundant volatle_reg() operation Mark Brown
2023-10-02  6:52   ` Neil Armstrong
2023-10-01 10:24 ` [PATCH 2/2] drm/panel: ili9322: Convert to use maple tree register cache Mark Brown
2023-10-02  6:52   ` Neil Armstrong
2023-10-02  7:11 ` [PATCH 0/2] drm/panel: ili9322: Minor regmap improvements Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®