Commit a2ee151b authored by Joonyoung Shim's avatar Joonyoung Shim Committed by Inki Dae

drm/exynos: use define instead of default_win member in struct mixer_context

The default_win member in struct mixer_context isn't change its value
after initialized to 0, so it's better using to define.
Signed-off-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent a634dd54
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "exynos_drm_hdmi.h" #include "exynos_drm_hdmi.h"
#define MIXER_WIN_NR 3 #define MIXER_WIN_NR 3
#define MIXER_DEFAULT_WIN 0
#define get_mixer_context(dev) platform_get_drvdata(to_platform_device(dev)) #define get_mixer_context(dev) platform_get_drvdata(to_platform_device(dev))
...@@ -75,7 +76,6 @@ struct mixer_resources { ...@@ -75,7 +76,6 @@ struct mixer_resources {
}; };
struct mixer_context { struct mixer_context {
unsigned int default_win;
unsigned int irq; unsigned int irq;
int pipe; int pipe;
bool interlace; bool interlace;
...@@ -640,7 +640,7 @@ static void mixer_win_mode_set(void *ctx, ...@@ -640,7 +640,7 @@ static void mixer_win_mode_set(void *ctx,
win = overlay->zpos; win = overlay->zpos;
if (win == DEFAULT_ZPOS) if (win == DEFAULT_ZPOS)
win = mixer_ctx->default_win; win = MIXER_DEFAULT_WIN;
if (win < 0 || win > MIXER_WIN_NR) { if (win < 0 || win > MIXER_WIN_NR) {
DRM_ERROR("overlay plane[%d] is wrong\n", win); DRM_ERROR("overlay plane[%d] is wrong\n", win);
...@@ -680,7 +680,7 @@ static void mixer_win_commit(void *ctx, int zpos) ...@@ -680,7 +680,7 @@ static void mixer_win_commit(void *ctx, int zpos)
DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win); DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win);
if (win == DEFAULT_ZPOS) if (win == DEFAULT_ZPOS)
win = mixer_ctx->default_win; win = MIXER_DEFAULT_WIN;
if (win < 0 || win > MIXER_WIN_NR) { if (win < 0 || win > MIXER_WIN_NR) {
DRM_ERROR("overlay plane[%d] is wrong\n", win); DRM_ERROR("overlay plane[%d] is wrong\n", win);
...@@ -703,7 +703,7 @@ static void mixer_win_disable(void *ctx, int zpos) ...@@ -703,7 +703,7 @@ static void mixer_win_disable(void *ctx, int zpos)
DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win); DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win);
if (win == DEFAULT_ZPOS) if (win == DEFAULT_ZPOS)
win = mixer_ctx->default_win; win = MIXER_DEFAULT_WIN;
if (win < 0 || win > MIXER_WIN_NR) { if (win < 0 || win > MIXER_WIN_NR) {
DRM_ERROR("overlay plane[%d] is wrong\n", win); DRM_ERROR("overlay plane[%d] is wrong\n", win);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment