From mboxrd@z Thu Jan 1 00:00:00 1970 From: inki.dae@samsung.com (Inki Dae) Date: Fri, 12 Jan 2018 10:20:00 +0900 Subject: [PATCH 03/19] drm/exynos: Use the alpha format helper In-Reply-To: <345b8966460f13af7e29d2700876572d34f06cf4.1515494838.git-series.maxime.ripard@free-electrons.com> References: <345b8966460f13af7e29d2700876572d34f06cf4.1515494838.git-series.maxime.ripard@free-electrons.com> Message-ID: <5A580D40.9070504@samsung.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 2018? 01? 09? 19:56? Maxime Ripard ?(?) ? ?: > Now that the core has a drm format helper to tell if a format embeds an > alpha component in it, let's use it. > > Cc: Inki Dae > Cc: Joonyoung Shim > Cc: Kyungmin Park > Cc: Seung-Woo Kim > Signed-off-by: Maxime Ripard Acked-by: Inki Dae Thanks, Inki Dae > --- > drivers/gpu/drm/exynos/exynos_mixer.c | 14 +------------- > 1 file changed, 1 insertion(+), 13 deletions(-) > > diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c > index dc5d79465f9b..d7339a6d072c 100644 > --- a/drivers/gpu/drm/exynos/exynos_mixer.c > +++ b/drivers/gpu/drm/exynos/exynos_mixer.c > @@ -179,18 +179,6 @@ static const u8 filter_cr_horiz_tap4[] = { > 70, 59, 48, 37, 27, 19, 11, 5, > }; > > -static inline bool is_alpha_format(unsigned int pixel_format) > -{ > - switch (pixel_format) { > - case DRM_FORMAT_ARGB8888: > - case DRM_FORMAT_ARGB1555: > - case DRM_FORMAT_ARGB4444: > - return true; > - default: > - return false; > - } > -} > - > static inline u32 vp_reg_read(struct mixer_context *ctx, u32 reg_id) > { > return readl(ctx->vp_regs + reg_id); > @@ -625,7 +613,7 @@ static void mixer_graph_buffer(struct mixer_context *ctx, > mixer_reg_write(ctx, MXR_GRAPHIC_BASE(win), dma_addr); > > mixer_cfg_layer(ctx, win, priority, true); > - mixer_cfg_gfx_blend(ctx, win, is_alpha_format(fb->format->format)); > + mixer_cfg_gfx_blend(ctx, win, drm_format_has_alpha(fb->format->format)); > > /* layer update mandatory for mixer 16.0.33.0 */ > if (ctx->mxr_ver == MXR_VER_16_0_33_0 || > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Inki Dae Subject: Re: [PATCH 03/19] drm/exynos: Use the alpha format helper Date: Fri, 12 Jan 2018 10:20:00 +0900 Message-ID: <5A580D40.9070504@samsung.com> References: <345b8966460f13af7e29d2700876572d34f06cf4.1515494838.git-series.maxime.ripard@free-electrons.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8BIT Return-path: In-reply-to: <345b8966460f13af7e29d2700876572d34f06cf4.1515494838.git-series.maxime.ripard@free-electrons.com> Sender: linux-kernel-owner@vger.kernel.org To: Maxime Ripard , Chen-Yu Tsai , Daniel Vetter , Jani Nikula , Sean Paul Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , thomas@vitsch.nl, Joonyoung Shim , Kyungmin Park , Seung-Woo Kim List-Id: dri-devel@lists.freedesktop.org 2018년 01월 09일 19:56에 Maxime Ripard 이(가) 쓴 글: > Now that the core has a drm format helper to tell if a format embeds an > alpha component in it, let's use it. > > Cc: Inki Dae > Cc: Joonyoung Shim > Cc: Kyungmin Park > Cc: Seung-Woo Kim > Signed-off-by: Maxime Ripard Acked-by: Inki Dae Thanks, Inki Dae > --- > drivers/gpu/drm/exynos/exynos_mixer.c | 14 +------------- > 1 file changed, 1 insertion(+), 13 deletions(-) > > diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c > index dc5d79465f9b..d7339a6d072c 100644 > --- a/drivers/gpu/drm/exynos/exynos_mixer.c > +++ b/drivers/gpu/drm/exynos/exynos_mixer.c > @@ -179,18 +179,6 @@ static const u8 filter_cr_horiz_tap4[] = { > 70, 59, 48, 37, 27, 19, 11, 5, > }; > > -static inline bool is_alpha_format(unsigned int pixel_format) > -{ > - switch (pixel_format) { > - case DRM_FORMAT_ARGB8888: > - case DRM_FORMAT_ARGB1555: > - case DRM_FORMAT_ARGB4444: > - return true; > - default: > - return false; > - } > -} > - > static inline u32 vp_reg_read(struct mixer_context *ctx, u32 reg_id) > { > return readl(ctx->vp_regs + reg_id); > @@ -625,7 +613,7 @@ static void mixer_graph_buffer(struct mixer_context *ctx, > mixer_reg_write(ctx, MXR_GRAPHIC_BASE(win), dma_addr); > > mixer_cfg_layer(ctx, win, priority, true); > - mixer_cfg_gfx_blend(ctx, win, is_alpha_format(fb->format->format)); > + mixer_cfg_gfx_blend(ctx, win, drm_format_has_alpha(fb->format->format)); > > /* layer update mandatory for mixer 16.0.33.0 */ > if (ctx->mxr_ver == MXR_VER_16_0_33_0 || >