* [PATCH v2 1/3] drm/exynos: fix typos in hdmi and mixer
2015-04-06 23:14 drm/exynos: misc fixes Tobias Jakobi
@ 2015-04-06 23:14 ` Tobias Jakobi
2015-04-07 7:03 ` Joonyoung Shim
2015-04-07 13:35 ` Inki Dae
2015-04-06 23:14 ` [PATCH v2 2/3] drm/exynos: remove superfluous error messages Tobias Jakobi
2015-04-06 23:14 ` [PATCH v2 3/3] drm/exynos: mixer: add 2x scaling to mixer_graph_buffer Tobias Jakobi
2 siblings, 2 replies; 8+ messages in thread
From: Tobias Jakobi @ 2015-04-06 23:14 UTC (permalink / raw)
To: linux-samsung-soc; +Cc: dri-devel, Tobias Jakobi
Use the correct spelling for 'progressive'.
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
drivers/gpu/drm/exynos/exynos_mixer.c | 2 +-
drivers/gpu/drm/exynos/regs-mixer.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 3511fcc..20e2ce7 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2022,7 +2022,7 @@ static void hdmi_mode_set(struct exynos_drm_display *display,
DRM_DEBUG_KMS("xres=%d, yres=%d, refresh=%d, intl=%s\n",
m->hdisplay, m->vdisplay,
m->vrefresh, (m->flags & DRM_MODE_FLAG_INTERLACE) ?
- "INTERLACED" : "PROGERESSIVE");
+ "INTERLACED" : "PROGRESSIVE");
/* preserve mode information for later use. */
drm_mode_copy(&hdata->current_mode, mode);
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index aa5b6e1..5ab0e32 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -267,7 +267,7 @@ static void mixer_cfg_scan(struct mixer_context *ctx, unsigned int height)
/* choosing between interlace and progressive mode */
val = (ctx->interlace ? MXR_CFG_SCAN_INTERLACE :
- MXR_CFG_SCAN_PROGRASSIVE);
+ MXR_CFG_SCAN_PROGRESSIVE);
if (ctx->mxr_ver != MXR_VER_128_0_0_184) {
/* choosing between proper HD and SD mode */
diff --git a/drivers/gpu/drm/exynos/regs-mixer.h b/drivers/gpu/drm/exynos/regs-mixer.h
index 5f32e1a..ac60260 100644
--- a/drivers/gpu/drm/exynos/regs-mixer.h
+++ b/drivers/gpu/drm/exynos/regs-mixer.h
@@ -101,7 +101,7 @@
#define MXR_CFG_GRP0_ENABLE (1 << 4)
#define MXR_CFG_VP_ENABLE (1 << 3)
#define MXR_CFG_SCAN_INTERLACE (0 << 2)
-#define MXR_CFG_SCAN_PROGRASSIVE (1 << 2)
+#define MXR_CFG_SCAN_PROGRESSIVE (1 << 2)
#define MXR_CFG_SCAN_NTSC (0 << 1)
#define MXR_CFG_SCAN_PAL (1 << 1)
#define MXR_CFG_SCAN_SD (0 << 0)
--
2.0.5
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/3] drm/exynos: fix typos in hdmi and mixer
2015-04-06 23:14 ` [PATCH v2 1/3] drm/exynos: fix typos in hdmi and mixer Tobias Jakobi
@ 2015-04-07 7:03 ` Joonyoung Shim
2015-04-07 13:35 ` Inki Dae
1 sibling, 0 replies; 8+ messages in thread
From: Joonyoung Shim @ 2015-04-07 7:03 UTC (permalink / raw)
To: Tobias Jakobi, linux-samsung-soc; +Cc: dri-devel, gustavo, inki.dae
Hi,
On 04/07/2015 08:14 AM, Tobias Jakobi wrote:
> Use the correct spelling for 'progressive'.
>
> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
> drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
> drivers/gpu/drm/exynos/exynos_mixer.c | 2 +-
> drivers/gpu/drm/exynos/regs-mixer.h | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 3511fcc..20e2ce7 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -2022,7 +2022,7 @@ static void hdmi_mode_set(struct exynos_drm_display *display,
> DRM_DEBUG_KMS("xres=%d, yres=%d, refresh=%d, intl=%s\n",
> m->hdisplay, m->vdisplay,
> m->vrefresh, (m->flags & DRM_MODE_FLAG_INTERLACE) ?
> - "INTERLACED" : "PROGERESSIVE");
> + "INTERLACED" : "PROGRESSIVE");
>
> /* preserve mode information for later use. */
> drm_mode_copy(&hdata->current_mode, mode);
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index aa5b6e1..5ab0e32 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -267,7 +267,7 @@ static void mixer_cfg_scan(struct mixer_context *ctx, unsigned int height)
>
> /* choosing between interlace and progressive mode */
> val = (ctx->interlace ? MXR_CFG_SCAN_INTERLACE :
> - MXR_CFG_SCAN_PROGRASSIVE);
> + MXR_CFG_SCAN_PROGRESSIVE);
>
> if (ctx->mxr_ver != MXR_VER_128_0_0_184) {
> /* choosing between proper HD and SD mode */
> diff --git a/drivers/gpu/drm/exynos/regs-mixer.h b/drivers/gpu/drm/exynos/regs-mixer.h
> index 5f32e1a..ac60260 100644
> --- a/drivers/gpu/drm/exynos/regs-mixer.h
> +++ b/drivers/gpu/drm/exynos/regs-mixer.h
> @@ -101,7 +101,7 @@
> #define MXR_CFG_GRP0_ENABLE (1 << 4)
> #define MXR_CFG_VP_ENABLE (1 << 3)
> #define MXR_CFG_SCAN_INTERLACE (0 << 2)
> -#define MXR_CFG_SCAN_PROGRASSIVE (1 << 2)
> +#define MXR_CFG_SCAN_PROGRESSIVE (1 << 2)
> #define MXR_CFG_SCAN_NTSC (0 << 1)
> #define MXR_CFG_SCAN_PAL (1 << 1)
> #define MXR_CFG_SCAN_SD (0 << 0)
>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/3] drm/exynos: fix typos in hdmi and mixer
2015-04-06 23:14 ` [PATCH v2 1/3] drm/exynos: fix typos in hdmi and mixer Tobias Jakobi
2015-04-07 7:03 ` Joonyoung Shim
@ 2015-04-07 13:35 ` Inki Dae
1 sibling, 0 replies; 8+ messages in thread
From: Inki Dae @ 2015-04-07 13:35 UTC (permalink / raw)
To: Tobias Jakobi; +Cc: linux-samsung-soc, dri-devel
On 2015년 04월 07일 08:14, Tobias Jakobi wrote:
> Use the correct spelling for 'progressive'.
1 through 3, Applied.
Thanks,
Inki Dae
>
> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
> drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
> drivers/gpu/drm/exynos/exynos_mixer.c | 2 +-
> drivers/gpu/drm/exynos/regs-mixer.h | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 3511fcc..20e2ce7 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -2022,7 +2022,7 @@ static void hdmi_mode_set(struct exynos_drm_display *display,
> DRM_DEBUG_KMS("xres=%d, yres=%d, refresh=%d, intl=%s\n",
> m->hdisplay, m->vdisplay,
> m->vrefresh, (m->flags & DRM_MODE_FLAG_INTERLACE) ?
> - "INTERLACED" : "PROGERESSIVE");
> + "INTERLACED" : "PROGRESSIVE");
>
> /* preserve mode information for later use. */
> drm_mode_copy(&hdata->current_mode, mode);
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index aa5b6e1..5ab0e32 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -267,7 +267,7 @@ static void mixer_cfg_scan(struct mixer_context *ctx, unsigned int height)
>
> /* choosing between interlace and progressive mode */
> val = (ctx->interlace ? MXR_CFG_SCAN_INTERLACE :
> - MXR_CFG_SCAN_PROGRASSIVE);
> + MXR_CFG_SCAN_PROGRESSIVE);
>
> if (ctx->mxr_ver != MXR_VER_128_0_0_184) {
> /* choosing between proper HD and SD mode */
> diff --git a/drivers/gpu/drm/exynos/regs-mixer.h b/drivers/gpu/drm/exynos/regs-mixer.h
> index 5f32e1a..ac60260 100644
> --- a/drivers/gpu/drm/exynos/regs-mixer.h
> +++ b/drivers/gpu/drm/exynos/regs-mixer.h
> @@ -101,7 +101,7 @@
> #define MXR_CFG_GRP0_ENABLE (1 << 4)
> #define MXR_CFG_VP_ENABLE (1 << 3)
> #define MXR_CFG_SCAN_INTERLACE (0 << 2)
> -#define MXR_CFG_SCAN_PROGRASSIVE (1 << 2)
> +#define MXR_CFG_SCAN_PROGRESSIVE (1 << 2)
> #define MXR_CFG_SCAN_NTSC (0 << 1)
> #define MXR_CFG_SCAN_PAL (1 << 1)
> #define MXR_CFG_SCAN_SD (0 << 0)
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] drm/exynos: remove superfluous error messages
2015-04-06 23:14 drm/exynos: misc fixes Tobias Jakobi
2015-04-06 23:14 ` [PATCH v2 1/3] drm/exynos: fix typos in hdmi and mixer Tobias Jakobi
@ 2015-04-06 23:14 ` Tobias Jakobi
2015-04-07 7:04 ` Joonyoung Shim
2015-04-06 23:14 ` [PATCH v2 3/3] drm/exynos: mixer: add 2x scaling to mixer_graph_buffer Tobias Jakobi
2 siblings, 1 reply; 8+ messages in thread
From: Tobias Jakobi @ 2015-04-06 23:14 UTC (permalink / raw)
To: linux-samsung-soc
Cc: dri-devel, gustavo, jy0922.shim, inki.dae, Tobias Jakobi
The messages are redundant since 'check_fb_gem_memory_type'
already prints out exactly the same string when it fails.
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
drivers/gpu/drm/exynos/exynos_drm_fb.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
index d346d1e..929cb03 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
@@ -151,10 +151,8 @@ exynos_drm_framebuffer_init(struct drm_device *dev,
exynos_gem_obj = to_exynos_gem_obj(obj);
ret = check_fb_gem_memory_type(dev, exynos_gem_obj);
- if (ret < 0) {
- DRM_ERROR("cannot use this gem memory type for fb.\n");
- return ERR_PTR(-EINVAL);
- }
+ if (ret < 0)
+ return ERR_PTR(ret);
exynos_fb = kzalloc(sizeof(*exynos_fb), GFP_KERNEL);
if (!exynos_fb)
@@ -250,10 +248,8 @@ exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
exynos_fb->exynos_gem_obj[i] = exynos_gem_obj;
ret = check_fb_gem_memory_type(dev, exynos_gem_obj);
- if (ret < 0) {
- DRM_ERROR("cannot use this gem memory type for fb.\n");
+ if (ret < 0)
goto err_unreference;
- }
}
ret = drm_framebuffer_init(dev, &exynos_fb->fb, &exynos_drm_fb_funcs);
--
2.0.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/3] drm/exynos: remove superfluous error messages
2015-04-06 23:14 ` [PATCH v2 2/3] drm/exynos: remove superfluous error messages Tobias Jakobi
@ 2015-04-07 7:04 ` Joonyoung Shim
0 siblings, 0 replies; 8+ messages in thread
From: Joonyoung Shim @ 2015-04-07 7:04 UTC (permalink / raw)
To: Tobias Jakobi, linux-samsung-soc; +Cc: dri-devel
Hi,
On 04/07/2015 08:14 AM, Tobias Jakobi wrote:
> The messages are redundant since 'check_fb_gem_memory_type'
> already prints out exactly the same string when it fails.
>
> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
> drivers/gpu/drm/exynos/exynos_drm_fb.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
> index d346d1e..929cb03 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
> @@ -151,10 +151,8 @@ exynos_drm_framebuffer_init(struct drm_device *dev,
> exynos_gem_obj = to_exynos_gem_obj(obj);
>
> ret = check_fb_gem_memory_type(dev, exynos_gem_obj);
> - if (ret < 0) {
> - DRM_ERROR("cannot use this gem memory type for fb.\n");
> - return ERR_PTR(-EINVAL);
> - }
> + if (ret < 0)
> + return ERR_PTR(ret);
>
> exynos_fb = kzalloc(sizeof(*exynos_fb), GFP_KERNEL);
> if (!exynos_fb)
> @@ -250,10 +248,8 @@ exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
> exynos_fb->exynos_gem_obj[i] = exynos_gem_obj;
>
> ret = check_fb_gem_memory_type(dev, exynos_gem_obj);
> - if (ret < 0) {
> - DRM_ERROR("cannot use this gem memory type for fb.\n");
> + if (ret < 0)
> goto err_unreference;
> - }
> }
>
> ret = drm_framebuffer_init(dev, &exynos_fb->fb, &exynos_drm_fb_funcs);
>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Thanks.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] drm/exynos: mixer: add 2x scaling to mixer_graph_buffer
2015-04-06 23:14 drm/exynos: misc fixes Tobias Jakobi
2015-04-06 23:14 ` [PATCH v2 1/3] drm/exynos: fix typos in hdmi and mixer Tobias Jakobi
2015-04-06 23:14 ` [PATCH v2 2/3] drm/exynos: remove superfluous error messages Tobias Jakobi
@ 2015-04-06 23:14 ` Tobias Jakobi
2015-04-07 7:10 ` Joonyoung Shim
2 siblings, 1 reply; 8+ messages in thread
From: Tobias Jakobi @ 2015-04-06 23:14 UTC (permalink / raw)
To: linux-samsung-soc
Cc: dri-devel, gustavo, jy0922.shim, inki.dae, Tobias Jakobi
While the VP (video processor) supports arbitrary scaling
of its input, the mixer just supports a simple 2x (line
doubling) scaling. Expose this functionality and exit
early when an unsupported scaling configuration is
encountered.
This was tested with modetest's DRM plane test (from
the libdrm test suite) on an Odroid-X2 (Exynos4412).
v2: Put if- and return-statement on different lines.
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
drivers/gpu/drm/exynos/exynos_mixer.c | 36 +++++++++++++++++++++++++++++------
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index 5ab0e32..f51011e 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -499,12 +499,36 @@ static void mixer_layer_update(struct mixer_context *ctx)
mixer_reg_writemask(res, MXR_CFG, ~0, MXR_CFG_LAYER_UPDATE);
}
+static int mixer_setup_scale(const struct exynos_drm_plane *plane,
+ unsigned int *x_ratio, unsigned int *y_ratio)
+{
+ if (plane->crtc_width != plane->src_width) {
+ if (plane->crtc_width == 2 * plane->src_width)
+ *x_ratio = 1;
+ else
+ goto fail;
+ }
+
+ if (plane->crtc_height != plane->src_height) {
+ if (plane->crtc_height == 2 * plane->src_height)
+ *y_ratio = 1;
+ else
+ goto fail;
+ }
+
+ return 0;
+
+fail:
+ DRM_DEBUG_KMS("only 2x width/height scaling of plane supported\n");
+ return -ENOTSUPP;
+}
+
static void mixer_graph_buffer(struct mixer_context *ctx, int win)
{
struct mixer_resources *res = &ctx->mixer_res;
unsigned long flags;
struct exynos_drm_plane *plane;
- unsigned int x_ratio, y_ratio;
+ unsigned int x_ratio = 0, y_ratio = 0;
unsigned int src_x_offset, src_y_offset, dst_x_offset, dst_y_offset;
dma_addr_t dma_addr;
unsigned int fmt;
@@ -528,9 +552,9 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win)
fmt = ARGB8888;
}
- /* 2x scaling feature */
- x_ratio = 0;
- y_ratio = 0;
+ /* check if mixer supports requested scaling setup */
+ if (mixer_setup_scale(plane, &x_ratio, &y_ratio))
+ return;
dst_x_offset = plane->crtc_x;
dst_y_offset = plane->crtc_y;
@@ -566,8 +590,8 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win)
mixer_reg_write(res, MXR_RESOLUTION, val);
}
- val = MXR_GRP_WH_WIDTH(plane->crtc_width);
- val |= MXR_GRP_WH_HEIGHT(plane->crtc_height);
+ val = MXR_GRP_WH_WIDTH(plane->src_width);
+ val |= MXR_GRP_WH_HEIGHT(plane->src_height);
val |= MXR_GRP_WH_H_SCALE(x_ratio);
val |= MXR_GRP_WH_V_SCALE(y_ratio);
mixer_reg_write(res, MXR_GRAPHIC_WH(win), val);
--
2.0.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/3] drm/exynos: mixer: add 2x scaling to mixer_graph_buffer
2015-04-06 23:14 ` [PATCH v2 3/3] drm/exynos: mixer: add 2x scaling to mixer_graph_buffer Tobias Jakobi
@ 2015-04-07 7:10 ` Joonyoung Shim
0 siblings, 0 replies; 8+ messages in thread
From: Joonyoung Shim @ 2015-04-07 7:10 UTC (permalink / raw)
To: Tobias Jakobi, linux-samsung-soc; +Cc: dri-devel
Hi,
On 04/07/2015 08:14 AM, Tobias Jakobi wrote:
> While the VP (video processor) supports arbitrary scaling
> of its input, the mixer just supports a simple 2x (line
> doubling) scaling. Expose this functionality and exit
> early when an unsupported scaling configuration is
> encountered.
>
> This was tested with modetest's DRM plane test (from
> the libdrm test suite) on an Odroid-X2 (Exynos4412).
>
> v2: Put if- and return-statement on different lines.
>
> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
> drivers/gpu/drm/exynos/exynos_mixer.c | 36 +++++++++++++++++++++++++++++------
> 1 file changed, 30 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index 5ab0e32..f51011e 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -499,12 +499,36 @@ static void mixer_layer_update(struct mixer_context *ctx)
> mixer_reg_writemask(res, MXR_CFG, ~0, MXR_CFG_LAYER_UPDATE);
> }
>
> +static int mixer_setup_scale(const struct exynos_drm_plane *plane,
> + unsigned int *x_ratio, unsigned int *y_ratio)
> +{
> + if (plane->crtc_width != plane->src_width) {
> + if (plane->crtc_width == 2 * plane->src_width)
> + *x_ratio = 1;
> + else
> + goto fail;
> + }
> +
> + if (plane->crtc_height != plane->src_height) {
> + if (plane->crtc_height == 2 * plane->src_height)
> + *y_ratio = 1;
> + else
> + goto fail;
> + }
> +
> + return 0;
> +
> +fail:
> + DRM_DEBUG_KMS("only 2x width/height scaling of plane supported\n");
> + return -ENOTSUPP;
> +}
> +
> static void mixer_graph_buffer(struct mixer_context *ctx, int win)
> {
> struct mixer_resources *res = &ctx->mixer_res;
> unsigned long flags;
> struct exynos_drm_plane *plane;
> - unsigned int x_ratio, y_ratio;
> + unsigned int x_ratio = 0, y_ratio = 0;
> unsigned int src_x_offset, src_y_offset, dst_x_offset, dst_y_offset;
> dma_addr_t dma_addr;
> unsigned int fmt;
> @@ -528,9 +552,9 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win)
> fmt = ARGB8888;
> }
>
> - /* 2x scaling feature */
> - x_ratio = 0;
> - y_ratio = 0;
> + /* check if mixer supports requested scaling setup */
> + if (mixer_setup_scale(plane, &x_ratio, &y_ratio))
> + return;
>
> dst_x_offset = plane->crtc_x;
> dst_y_offset = plane->crtc_y;
> @@ -566,8 +590,8 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win)
> mixer_reg_write(res, MXR_RESOLUTION, val);
> }
>
> - val = MXR_GRP_WH_WIDTH(plane->crtc_width);
> - val |= MXR_GRP_WH_HEIGHT(plane->crtc_height);
> + val = MXR_GRP_WH_WIDTH(plane->src_width);
> + val |= MXR_GRP_WH_HEIGHT(plane->src_height);
With this changes, i got errors when crtc gets out bound of actual
screen area. I sent patch to fix it and to calculate ratio from
exynos_drm plane codes.
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Thanks.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread