2024-01-17 03:10:03

by Bo Liu

[permalink] [raw]
Subject: [PATCH] media: i2c: isl7998x: convert to use maple tree register cache

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: Bo Liu <[email protected]>
---
drivers/media/i2c/isl7998x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/isl7998x.c b/drivers/media/i2c/isl7998x.c
index 89e13ebbce0c..c7089035bbc1 100644
--- a/drivers/media/i2c/isl7998x.c
+++ b/drivers/media/i2c/isl7998x.c
@@ -1337,7 +1337,7 @@ static const struct regmap_config isl7998x_regmap = {
.rd_table = &isl7998x_readable_table,
.wr_table = &isl7998x_writeable_table,
.volatile_table = &isl7998x_volatile_table,
- .cache_type = REGCACHE_RBTREE,
+ .cache_type = REGCACHE_MAPLE,
};

static int isl7998x_mc_init(struct isl7998x *isl7998x)
--
2.31.1



2024-01-25 09:02:44

by Michael Tretter

[permalink] [raw]
Subject: Re: [PATCH] media: i2c: isl7998x: convert to use maple tree register cache

On Tue, 16 Jan 2024 22:09:10 -0500, Bo Liu 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: Bo Liu <[email protected]>

Reviewed-by: Michael Tretter <[email protected]>

> ---
> drivers/media/i2c/isl7998x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/isl7998x.c b/drivers/media/i2c/isl7998x.c
> index 89e13ebbce0c..c7089035bbc1 100644
> --- a/drivers/media/i2c/isl7998x.c
> +++ b/drivers/media/i2c/isl7998x.c
> @@ -1337,7 +1337,7 @@ static const struct regmap_config isl7998x_regmap = {
> .rd_table = &isl7998x_readable_table,
> .wr_table = &isl7998x_writeable_table,
> .volatile_table = &isl7998x_volatile_table,
> - .cache_type = REGCACHE_RBTREE,
> + .cache_type = REGCACHE_MAPLE,
> };
>
> static int isl7998x_mc_init(struct isl7998x *isl7998x)
> --
> 2.31.1
>
>