diff mbox series

drm/i915/gvt: store virtual_dp_monitor_edid in rodata

Message ID 20241218141945.2588604-1-jani.nikula@intel.com (mailing list archive)
State New
Headers show
Series drm/i915/gvt: store virtual_dp_monitor_edid in rodata | expand

Commit Message

Jani Nikula Dec. 18, 2024, 2:19 p.m. UTC
The virtual DP EDID isn't modified. Add const modifier to store it in
rodata.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/gvt/display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Garg, Nemesa Dec. 18, 2024, 2:37 p.m. UTC | #1
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Jani
> Nikula
> Sent: Wednesday, December 18, 2024 7:50 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: intel-gvt-dev@lists.freedesktop.org; Nikula, Jani <jani.nikula@intel.com>
> Subject: [PATCH] drm/i915/gvt: store virtual_dp_monitor_edid in rodata
> 
> The virtual DP EDID isn't modified. Add const modifier to store it in rodata.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

LGTM,
Reviewed-by: Nemesa Garg <nemesa.garg@intel.com>
> ---
>  drivers/gpu/drm/i915/gvt/display.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/display.c
> b/drivers/gpu/drm/i915/gvt/display.c
> index 95570cabdf27..c98dfcc3d0de 100644
> --- a/drivers/gpu/drm/i915/gvt/display.c
> +++ b/drivers/gpu/drm/i915/gvt/display.c
> @@ -97,7 +97,7 @@ int pipe_is_enabled(struct intel_vgpu *vgpu, int pipe)
>  	return 0;
>  }
> 
> -static unsigned char virtual_dp_monitor_edid[GVT_EDID_NUM][EDID_SIZE]
> = {
> +static const unsigned char
> +virtual_dp_monitor_edid[GVT_EDID_NUM][EDID_SIZE] = {
>  	{
>  /* EDID with 1024x768 as its resolution */
>  		/*Header*/
> --
> 2.39.5
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gvt/display.c b/drivers/gpu/drm/i915/gvt/display.c
index 95570cabdf27..c98dfcc3d0de 100644
--- a/drivers/gpu/drm/i915/gvt/display.c
+++ b/drivers/gpu/drm/i915/gvt/display.c
@@ -97,7 +97,7 @@  int pipe_is_enabled(struct intel_vgpu *vgpu, int pipe)
 	return 0;
 }
 
-static unsigned char virtual_dp_monitor_edid[GVT_EDID_NUM][EDID_SIZE] = {
+static const unsigned char virtual_dp_monitor_edid[GVT_EDID_NUM][EDID_SIZE] = {
 	{
 /* EDID with 1024x768 as its resolution */
 		/*Header*/