lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOw6vb+yEdgx+qxNh7xBjtwEi3cYckqKYqAp4ytb+qUwjdQY1w@mail.gmail.com>
Date:	Wed, 29 Jun 2016 09:57:39 -0400
From:	Sean Paul <seanpaul@...omium.org>
To:	Yakir Yang <ykk@...k-chips.com>
Cc:	Mark Yao <yzq@...k-chips.com>, Inki Dae <inki.dae@...sung.com>,
	Jingoo Han <jingoohan1@...il.com>,
	Heiko Stuebner <heiko@...ech.de>,
	Javier Martinez Canillas <javier@....samsung.com>,
	Stéphane Marchesin <marcheu@...omium.org>,
	Tomasz Figa <tfiga@...omium.org>,
	David Airlie <airlied@...ux.ie>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	Thierry Reding <treding@...dia.com>,
	Douglas Anderson <dianders@...omium.org>,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	Emil Velikov <emil.l.velikov@...il.com>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	dri-devel <dri-devel@...ts.freedesktop.org>,
	linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
	linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH v4 07/11] drm/rockchip: analogix_dp: correct the connector
 display color format and bpc

On Wed, Jun 29, 2016 at 5:15 AM, Yakir Yang <ykk@...k-chips.com> wrote:
> Rockchip VOP couldn't output YUV video format for eDP controller, so
> when driver detect connector support YUV video format, we need to hack
> it down to RGB888.
>
> Signed-off-by: Yakir Yang <ykk@...k-chips.com>
> Acked-by: Mark Yao <mark.yao@...k-chips.com>
> Reviewed-by: Tomasz Figa <tomasz.figa@...omium.com>

Reviewed-by: Sean Paul <seanpaul@...omium.org>


> ---
> Changes in v4:
> - Using mask variable to collect the YUV video format. (Sean)
> - Add reviewed flag from Tomasz.
>
> Changes in v3:
> - Hook the connector's color_formats in .get_modes directly. (Tomasz, reviewed at Google Gerrit)
>     [https://chromium-review.googlesource.com/#/c/346317/15]
> - Add the acked flag from Mark.
>
>  drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> index 0755573..0a0fb3a 100644
> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> @@ -110,6 +110,23 @@ static int rockchip_dp_powerdown(struct analogix_dp_plat_data *plat_data)
>         return 0;
>  }
>
> +static int rockchip_dp_get_modes(struct analogix_dp_plat_data *plat_data,
> +                                struct drm_connector *connector)
> +{
> +       struct drm_display_info *di = &connector->display_info;
> +       /* VOP couldn't output YUV video format for eDP rightly */
> +       u32 mask = DRM_COLOR_FORMAT_YCRCB444 | DRM_COLOR_FORMAT_YCRCB422;
> +
> +       if ((di->color_formats & mask)) {
> +               DRM_DEBUG_KMS("Swapping display color format from YUV to RGB\n");
> +               di->color_formats &= ~mask;
> +               di->color_formats |= DRM_COLOR_FORMAT_RGB444;
> +               di->bpc = 8;
> +       }
> +
> +       return 0;
> +}
> +
>  static bool
>  rockchip_dp_drm_encoder_mode_fixup(struct drm_encoder *encoder,
>                                    const struct drm_display_mode *mode,
> @@ -310,6 +327,7 @@ static int rockchip_dp_bind(struct device *dev, struct device *master,
>         dp->plat_data.dev_type = dp->data->chip_type;
>         dp->plat_data.power_on = rockchip_dp_poweron;
>         dp->plat_data.power_off = rockchip_dp_powerdown;
> +       dp->plat_data.get_modes = rockchip_dp_get_modes;
>
>         return analogix_dp_bind(dev, dp->drm_dev, &dp->plat_data);
>  }
> --
> 1.9.1
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ