Skip to content

Commit 960b537

Browse files
arndbdaeinki
authored andcommitted
drm/exynos: fix accidental on-stack copy of exynos_drm_plane
gcc rightfully complains about excessive stack usage in the fimd_win_set_pixfmt() function: drivers/gpu/drm/exynos/exynos_drm_fimd.c: In function 'fimd_win_set_pixfmt': drivers/gpu/drm/exynos/exynos_drm_fimd.c:750:1: error: the frame size of 1032 bytes is larger than 1024 byte drivers/gpu/drm/exynos/exynos5433_drm_decon.c: In function 'decon_win_set_pixfmt': drivers/gpu/drm/exynos/exynos5433_drm_decon.c:381:1: error: the frame size of 1032 bytes is larger than 1024 bytes There is really no reason to copy the large exynos_drm_plane structure to the stack before using one of its members, so just use a pointer instead. Fixes: 6f8ee5c ("drm/exynos: fimd: Make plane alpha configurable") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
1 parent 477552e commit 960b537

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/gpu/drm/exynos/exynos5433_drm_decon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ static void decon_win_set_bldmod(struct decon_context *ctx, unsigned int win,
319319
static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
320320
struct drm_framebuffer *fb)
321321
{
322-
struct exynos_drm_plane plane = ctx->planes[win];
322+
struct exynos_drm_plane *plane = &ctx->planes[win];
323323
struct exynos_drm_plane_state *state =
324-
to_exynos_plane_state(plane.base.state);
324+
to_exynos_plane_state(plane->base.state);
325325
unsigned int alpha = state->base.alpha;
326326
unsigned int pixel_alpha;
327327
unsigned long val;

drivers/gpu/drm/exynos/exynos_drm_fimd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,9 +661,9 @@ static void fimd_win_set_bldmod(struct fimd_context *ctx, unsigned int win,
661661
static void fimd_win_set_pixfmt(struct fimd_context *ctx, unsigned int win,
662662
struct drm_framebuffer *fb, int width)
663663
{
664-
struct exynos_drm_plane plane = ctx->planes[win];
664+
struct exynos_drm_plane *plane = &ctx->planes[win];
665665
struct exynos_drm_plane_state *state =
666-
to_exynos_plane_state(plane.base.state);
666+
to_exynos_plane_state(plane->base.state);
667667
uint32_t pixel_format = fb->format->format;
668668
unsigned int alpha = state->base.alpha;
669669
u32 val = WINCONx_ENWIN;

0 commit comments

Comments
 (0)