[PATCH] drm/i915/dmc_wl: store register ranges in rodata
Gustavo Sousa
gustavo.sousa at intel.com
Wed Dec 18 14:28:38 UTC 2024
Quoting Jani Nikula (2024-12-18 11:17:34-03:00)
>Add const to register range arrays to store them in rodata. They don't
>need to be modified.
>
>Cc: Gustavo Sousa <gustavo.sousa at intel.com>
>Signed-off-by: Jani Nikula <jani.nikula at intel.com>
Good idea.
Reviewed-by: Gustavo Sousa <gustavo.sousa at intel.com>
>---
> drivers/gpu/drm/i915/display/intel_dmc_wl.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_dmc_wl.c b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
>index 3ac44151aab5..02de3ae15074 100644
>--- a/drivers/gpu/drm/i915/display/intel_dmc_wl.c
>+++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
>@@ -55,12 +55,12 @@ struct intel_dmc_wl_range {
> u32 end;
> };
>
>-static struct intel_dmc_wl_range powered_off_ranges[] = {
>+static const struct intel_dmc_wl_range powered_off_ranges[] = {
> { .start = 0x60000, .end = 0x7ffff },
> {},
> };
>
>-static struct intel_dmc_wl_range xe3lpd_dc5_dc6_dmc_ranges[] = {
>+static const struct intel_dmc_wl_range xe3lpd_dc5_dc6_dmc_ranges[] = {
> { .start = 0x45500 }, /* DC_STATE_SEL */
> { .start = 0x457a0, .end = 0x457b0 }, /* DC*_RESIDENCY_COUNTER */
> { .start = 0x45504 }, /* DC_STATE_EN */
>@@ -94,7 +94,7 @@ static struct intel_dmc_wl_range xe3lpd_dc5_dc6_dmc_ranges[] = {
> {},
> };
>
>-static struct intel_dmc_wl_range xe3lpd_dc3co_dmc_ranges[] = {
>+static const struct intel_dmc_wl_range xe3lpd_dc3co_dmc_ranges[] = {
> { .start = 0x454a0 }, /* CHICKEN_DCPR_4 */
>
> { .start = 0x45504 }, /* DC_STATE_EN */
>--
>2.39.5
>
More information about the Intel-gfx
mailing list