drm/client: Constify modes

The modes used by the client code live on the connectors' mode
lists, which are not owned by the client code, and thus it has
no business modifying the modes. Mark the modes const to make
that fact abundantly clear.

v2: Fix up the kunit test

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250303093847.7698-1-ville.syrjala@linux.intel.com
This commit is contained in:
Ville Syrjälä
2025-03-03 11:38:47 +02:00
parent 10646ddac2
commit f68429691c
2 changed files with 23 additions and 19 deletions

View File

@@ -88,7 +88,8 @@ static void drm_test_pick_cmdline_res_1920_1080_60(struct kunit *test)
struct drm_device *drm = priv->drm;
struct drm_connector *connector = &priv->connector;
struct drm_cmdline_mode *cmdline_mode = &connector->cmdline_mode;
struct drm_display_mode *expected_mode, *mode;
struct drm_display_mode *expected_mode;
const struct drm_display_mode *mode;
const char *cmdline = "1920x1080@60";
int ret;