From: djkurtz@chromium.org (Daniel Kurtz)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] drm/exynos/mixer: planes are not disabled by setting dma_addr to zero
Date: Sun, 4 May 2014 23:26:20 +0800 [thread overview]
Message-ID: <1399217181-26442-4-git-send-email-djkurtz@chromium.org> (raw)
In-Reply-To: <1399217181-26442-1-git-send-email-djkurtz@chromium.org>
Planes are disabled by calling the win_mode_disable() callback, not by
calling win_mode_commit()[->vp_video_buffer] with dma_addr set to zero.
Thus, the comment in the pixel_format switch default clause is obsolete,
we should always check if the pixel_format is supported, and therefore,
since the driver does not actually supported single-buffer formats,
buf_num will always be 2, and we drop the broken 1-buffer case.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
---
drivers/gpu/drm/exynos/exynos_mixer.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index 40cf39b..b252ec7 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -382,7 +382,6 @@ static void vp_video_buffer(struct mixer_context *ctx, int win)
unsigned long flags;
struct hdmi_win_data *win_data;
unsigned int x_ratio, y_ratio;
- unsigned int buf_num = 1;
dma_addr_t luma_addr[2], chroma_addr[2];
bool tiled_mode = false;
bool crcb_mode = false;
@@ -393,16 +392,12 @@ static void vp_video_buffer(struct mixer_context *ctx, int win)
switch (win_data->pixel_format) {
case DRM_FORMAT_NV12MT:
tiled_mode = true;
+ /* fall through */
case DRM_FORMAT_NV12:
crcb_mode = false;
- buf_num = 2;
break;
/* TODO: single buffer format NV12, NV21 */
default:
- /* ignore pixel format at disable time */
- if (!win_data->dma_addr)
- break;
-
DRM_ERROR("pixel format for vp is wrong [%d].\n",
win_data->pixel_format);
return;
@@ -412,14 +407,8 @@ static void vp_video_buffer(struct mixer_context *ctx, int win)
x_ratio = (win_data->src_width << 16) / win_data->crtc_width;
y_ratio = (win_data->src_height << 16) / win_data->crtc_height;
- if (buf_num == 2) {
- luma_addr[0] = win_data->dma_addr;
- chroma_addr[0] = win_data->chroma_dma_addr;
- } else {
- luma_addr[0] = win_data->dma_addr;
- chroma_addr[0] = win_data->dma_addr
- + (win_data->fb_width * win_data->fb_height);
- }
+ luma_addr[0] = win_data->dma_addr;
+ chroma_addr[0] = win_data->chroma_dma_addr;
if (win_data->scan_flags & DRM_MODE_FLAG_INTERLACE) {
ctx->interlace = true;
--
1.9.1.423.g4596e3a
next prev parent reply other threads:[~2014-05-04 15:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-04 15:26 [PATCH 0/4] drm/exynos/mixer: small cleanups Daniel Kurtz
2014-05-04 15:26 ` [PATCH 1/4] drm/exynos/mixer: move format definitions to regs-mixer Daniel Kurtz
2014-05-04 15:26 ` [PATCH 2/4] drm/exynos/mixer: use MXR_GRP_SXY_SY Daniel Kurtz
2014-05-07 5:14 ` Seung-Woo Kim
2014-05-07 14:14 ` Daniel Kurtz
2014-05-08 4:33 ` Seung-Woo Kim
2014-05-08 9:21 ` Daniel Kurtz
2014-05-08 11:38 ` Inki Dae
2014-05-04 15:26 ` Daniel Kurtz [this message]
2014-05-04 15:26 ` [PATCH 4/4] drm/exynos/mixer: add support for NV21 Daniel Kurtz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1399217181-26442-4-git-send-email-djkurtz@chromium.org \
--to=djkurtz@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).