Commit 35152d11 authored by Maxime Ripard's avatar Maxime Ripard

drm/sun4i: backend: Remove ARGB spoofing

We've had some code for quite some time to prevent the alpha bug from
happening on the lowest primary plane. Since we now check for this in our
atomic_check, we can simply remove it.
Reviewed-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/965180afd8169ccaa848f061d16a2c1a9ec4d289.1518802627.git-series.maxime.ripard@bootlin.com
parent ded4f346
...@@ -92,13 +92,8 @@ void sun4i_backend_layer_enable(struct sun4i_backend *backend, ...@@ -92,13 +92,8 @@ void sun4i_backend_layer_enable(struct sun4i_backend *backend,
SUN4I_BACKEND_MODCTL_LAY_EN(layer), val); SUN4I_BACKEND_MODCTL_LAY_EN(layer), val);
} }
static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane, static int sun4i_backend_drm_format_to_layer(u32 format, u32 *mode)
u32 format, u32 *mode)
{ {
if (plane && (plane->type == DRM_PLANE_TYPE_PRIMARY) &&
(format == DRM_FORMAT_ARGB8888))
format = DRM_FORMAT_XRGB8888;
switch (format) { switch (format) {
case DRM_FORMAT_ARGB8888: case DRM_FORMAT_ARGB8888:
*mode = SUN4I_BACKEND_LAY_FBFMT_ARGB8888; *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB8888;
...@@ -191,8 +186,7 @@ int sun4i_backend_update_layer_formats(struct sun4i_backend *backend, ...@@ -191,8 +186,7 @@ int sun4i_backend_update_layer_formats(struct sun4i_backend *backend,
DRM_DEBUG_DRIVER("Switching display backend interlaced mode %s\n", DRM_DEBUG_DRIVER("Switching display backend interlaced mode %s\n",
interlaced ? "on" : "off"); interlaced ? "on" : "off");
ret = sun4i_backend_drm_format_to_layer(plane, fb->format->format, ret = sun4i_backend_drm_format_to_layer(fb->format->format, &val);
&val);
if (ret) { if (ret) {
DRM_DEBUG_DRIVER("Invalid format\n"); DRM_DEBUG_DRIVER("Invalid format\n");
return ret; return ret;
...@@ -211,7 +205,7 @@ int sun4i_backend_update_layer_frontend(struct sun4i_backend *backend, ...@@ -211,7 +205,7 @@ int sun4i_backend_update_layer_frontend(struct sun4i_backend *backend,
u32 val; u32 val;
int ret; int ret;
ret = sun4i_backend_drm_format_to_layer(NULL, fmt, &val); ret = sun4i_backend_drm_format_to_layer(fmt, &val);
if (ret) { if (ret) {
DRM_DEBUG_DRIVER("Invalid format\n"); DRM_DEBUG_DRIVER("Invalid format\n");
return ret; return ret;
......
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