drm/panel: samsung-s6d7aa0: use pointer for drm_mode in panel desc struct
Artur Weber
maintainerPATCH 1/1 drm/panel: samsung-s6d7aa0: use pointer for drm_mode in panel desc struct
Fixes compilation errors on older GCC versions (before 8.x) and Clang after changes introduced in commit 6810bb390282 ("drm/panel: Add Samsung S6D7AA0 panel controller driver"). Tested with GCC 13.1.1, GCC 6.4.0 and Clang 16.0.3.
--- drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c +5 -5
@@ -37,7 +37,7 @@ struct s6d7aa0_panel_desc {unsigned int panel_type;int (*init_func)(struct s6d7aa0 *ctx);int (*off_func)(struct s6d7aa0 *ctx); -const struct drm_display_mode drm_mode; +const struct drm_display_mode *drm_mode;unsigned long mode_flags;u32 bus_flags;bool has_backlight;
@@ -309,7 +309,7 @@ static const struct s6d7aa0_panel_desc s6d7aa0_lsl080al02_desc = { .panel_type = S6D7AA0_PANEL_LSL080AL02, .init_func = s6d7aa0_lsl080al02_init, .off_func = s6d7aa0_lsl080al02_off, - .drm_mode = s6d7aa0_lsl080al02_mode, + .drm_mode = &s6d7aa0_lsl080al02_mode, .mode_flags = MIPI_DSI_MODE_VSYNC_FLUSH | MIPI_DSI_MODE_VIDEO_NO_HFP, .bus_flags = DRM_BUS_FLAG_DE_HIGH,
@@ -412,7 +412,7 @@ static const struct s6d7aa0_panel_desc s6d7aa0_lsl080al03_desc = { .panel_type = S6D7AA0_PANEL_LSL080AL03, .init_func = s6d7aa0_lsl080al03_init, .off_func = s6d7aa0_lsl080al03_off, - .drm_mode = s6d7aa0_lsl080al03_mode, + .drm_mode = &s6d7aa0_lsl080al03_mode, .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET, .bus_flags = 0,
@@ -440,7 +440,7 @@ static const struct s6d7aa0_panel_desc s6d7aa0_ltl101at01_desc = { .panel_type = S6D7AA0_PANEL_LTL101AT01, .init_func = s6d7aa0_lsl080al03_init, /* Similar init to LSL080AL03 */ .off_func = s6d7aa0_lsl080al03_off, - .drm_mode = s6d7aa0_ltl101at01_mode, + .drm_mode = &s6d7aa0_ltl101at01_mode, .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET, .bus_flags = 0,
@@ -458,7 +458,7 @@ static int s6d7aa0_get_modes(struct drm_panel *panel,if (!ctx)return -EINVAL ; - mode =drm_mode_duplicate (connector->dev, &ctx->desc->drm_mode); + mode =drm_mode_duplicate (connector->dev, ctx->desc->drm_mode);if (!mode)return -ENOMEM ;
base-commit: 37cee4876a45a5c3da79a83d34ed4f3c68548aef
Signature · 1 line
2.40.1
Quoted 5 lines · Artur Weber
Fixes compilation errors on older GCC versions (before 8.x) and Clang after changes introduced in commit
6810bb390282("drm/panel: Add Samsung S6D7AA0 panel controller driver"). Tested with GCC 13.1.1, GCC 6.4.0 and Clang 16.0.3.
Hi Artur,
Thanks for the patch! Mind sending a v2 with the diagnostic added to the commit message? This gives reviewers much more context as to what issue you are fixing.
Quoted 60 lines
Signed-off-by Artur Weber <[email protected]>--- drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c +5
-5@@ -37,7 +37,7 @@ struct s6d7aa0_panel_desc {unsigned int panel_type;int (*init_func)(struct s6d7aa0 *ctx);int (*off_func)(struct s6d7aa0 *ctx); -const struct drm_display_mode drm_mode; +const struct drm_display_mode *drm_mode;unsigned long mode_flags;u32 bus_flags;bool has_backlight;@@ -309,7 +309,7 @@ static const struct s6d7aa0_panel_desc s6d7aa0_lsl080al02_desc = { .panel_type = S6D7AA0_PANEL_LSL080AL02, .init_func = s6d7aa0_lsl080al02_init, .off_func = s6d7aa0_lsl080al02_off, - .drm_mode = s6d7aa0_lsl080al02_mode, + .drm_mode = &s6d7aa0_lsl080al02_mode, .mode_flags = MIPI_DSI_MODE_VSYNC_FLUSH | MIPI_DSI_MODE_VIDEO_NO_HFP, .bus_flags = DRM_BUS_FLAG_DE_HIGH,@@ -412,7 +412,7 @@ static const struct s6d7aa0_panel_desc s6d7aa0_lsl080al03_desc = { .panel_type = S6D7AA0_PANEL_LSL080AL03, .init_func = s6d7aa0_lsl080al03_init, .off_func = s6d7aa0_lsl080al03_off, - .drm_mode = s6d7aa0_lsl080al03_mode, + .drm_mode = &s6d7aa0_lsl080al03_mode, .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET, .bus_flags = 0,@@ -440,7 +440,7 @@ static const struct s6d7aa0_panel_desc s6d7aa0_ltl101at01_desc = { .panel_type = S6D7AA0_PANEL_LTL101AT01, .init_func = s6d7aa0_lsl080al03_init, /* Similar init to LSL080AL03 */ .off_func = s6d7aa0_lsl080al03_off, - .drm_mode = s6d7aa0_ltl101at01_mode, + .drm_mode = &s6d7aa0_ltl101at01_mode, .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET, .bus_flags = 0,@@ -458,7 +458,7 @@ static int s6d7aa0_get_modes(struct drm_panel *panel,if (!ctx)return -EINVAL ; - mode =drm_mode_duplicate (connector->dev, &ctx->desc->drm_mode); + mode =drm_mode_duplicate (connector->dev, ctx->desc->drm_mode);if (!mode)return -ENOMEM ;base-commit:
37cee4876a45a5c3da79a83d34ed4f3c68548aef--
2.40.1
Signature · 2 lines
Thanks, ~Nick Desaulniers
Quoted 8 lines · Nick Desaulniers
Quoted 5 lines · Artur Weber
Fixes compilation errors on older GCC versions (before 8.x) and Clang after changes introduced in commit
6810bb390282("drm/panel: Add Samsung S6D7AA0 panel controller driver"). Tested with GCC 13.1.1, GCC 6.4.0 and Clang 16.0.3.
Quoted 4 lines
Hi Artur,
Thanks for the patch! Mind sending a v2 with the diagnostic added to the commit message? This gives reviewers much more context as to what issue you are fixing.
Perhaps it was these errors:
https://lore.kernel.org/llvm/[email protected]/T/#u
?
If so, please add
To the v2 commit message as well.
Quoted 66 lines
Quoted 57 lines
Signed-off-by Artur Weber <[email protected]>--- drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c +5
-5@@ -37,7 +37,7 @@ struct s6d7aa0_panel_desc {unsigned int panel_type;int (*init_func)(struct s6d7aa0 *ctx);int (*off_func)(struct s6d7aa0 *ctx); -const struct drm_display_mode drm_mode; +const struct drm_display_mode *drm_mode;unsigned long mode_flags;u32 bus_flags;bool has_backlight;@@ -309,7 +309,7 @@ static const struct s6d7aa0_panel_desc s6d7aa0_lsl080al02_desc = { .panel_type = S6D7AA0_PANEL_LSL080AL02, .init_func = s6d7aa0_lsl080al02_init, .off_func = s6d7aa0_lsl080al02_off, - .drm_mode = s6d7aa0_lsl080al02_mode, + .drm_mode = &s6d7aa0_lsl080al02_mode, .mode_flags = MIPI_DSI_MODE_VSYNC_FLUSH | MIPI_DSI_MODE_VIDEO_NO_HFP, .bus_flags = DRM_BUS_FLAG_DE_HIGH,@@ -412,7 +412,7 @@ static const struct s6d7aa0_panel_desc s6d7aa0_lsl080al03_desc = { .panel_type = S6D7AA0_PANEL_LSL080AL03, .init_func = s6d7aa0_lsl080al03_init, .off_func = s6d7aa0_lsl080al03_off, - .drm_mode = s6d7aa0_lsl080al03_mode, + .drm_mode = &s6d7aa0_lsl080al03_mode, .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET, .bus_flags = 0,@@ -440,7 +440,7 @@ static const struct s6d7aa0_panel_desc s6d7aa0_ltl101at01_desc = { .panel_type = S6D7AA0_PANEL_LTL101AT01, .init_func = s6d7aa0_lsl080al03_init, /* Similar init to LSL080AL03 */ .off_func = s6d7aa0_lsl080al03_off, - .drm_mode = s6d7aa0_ltl101at01_mode, + .drm_mode = &s6d7aa0_ltl101at01_mode, .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET, .bus_flags = 0,@@ -458,7 +458,7 @@ static int s6d7aa0_get_modes(struct drm_panel *panel,if (!ctx)return -EINVAL ; - mode =drm_mode_duplicate (connector->dev, &ctx->desc->drm_mode); + mode =drm_mode_duplicate (connector->dev, ctx->desc->drm_mode);if (!mode)return -ENOMEM ;Quoted 4 lines
base-commit:
37cee4876a45a5c3da79a83d34ed4f3c68548aef--
2.40.1--
Thanks,
~Nick Desaulniers
Signature · 2 lines
Thanks, ~Nick Desaulniers