From: Archit Taneja <architt@codeaurora.org>
To: Neil Armstrong <narmstrong@baylibre.com>,
dri-devel@lists.freedesktop.org
Cc: laurent.pinchart+renesas@ideasonboard.com,
Jose.Abreu@synopsys.com, linux-kernel@vger.kernel.org,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] drm: bridge: dw-hdmi: fix input format/encoding from plat_data
Date: Fri, 7 Apr 2017 14:02:06 +0530 [thread overview]
Message-ID: <b78c6ac0-1c73-67c9-8f8b-d9442aff8f9c@codeaurora.org> (raw)
In-Reply-To: <1491471244-24989-1-git-send-email-narmstrong@baylibre.com>
On 04/06/2017 03:04 PM, Neil Armstrong wrote:
> The plat_data->input_bus_format and plat_data->input_bus_encoding
> are unsigned long and are alsways >=0, but the value 0 was still
s/alsways/always
> considered as RGB888 like the default behaviour.
Is RGB888 default behaviour for plat_data->input_bus_encoding too?
You might want to rephrase it as the "default color space", or
something along those lines.
>
> This patch changes the if test to > 0.
The change technically makes the if statement check for a
non-zero value.
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Feel free to push to drm-misc after updating the commit message.
Thanks,
Archit
>
> Thanks to Dan Carpenter for his bug report at [1].
>
> Tested on Amlogic P230 (with CSC enabled for YUV444 to RGB) and Rockchip
> RK3288 ACT8846 EVB Board (no CSC involved, direct RGB passthrough).
>
> [1] http://lkml.kernel.org/r/20170406052120.GA26578@mwanda
>
> Cc: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 8b60503..100e1ee 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -1668,14 +1668,14 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
> hdmi->hdmi_data.video_mode.mpixelrepetitioninput = 0;
>
> /* TOFIX: Get input format from plat data or fallback to RGB888 */
> - if (hdmi->plat_data->input_bus_format >= 0)
> + if (hdmi->plat_data->input_bus_format)
> hdmi->hdmi_data.enc_in_bus_format =
> hdmi->plat_data->input_bus_format;
> else
> hdmi->hdmi_data.enc_in_bus_format = MEDIA_BUS_FMT_RGB888_1X24;
>
> /* TOFIX: Get input encoding from plat data or fallback to none */
> - if (hdmi->plat_data->input_bus_encoding >= 0)
> + if (hdmi->plat_data->input_bus_encoding)
> hdmi->hdmi_data.enc_in_encoding =
> hdmi->plat_data->input_bus_encoding;
> else
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2017-04-07 8:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 9:34 Neil Armstrong
2017-04-06 9:41 ` Neil Armstrong
2017-04-07 8:32 ` Archit Taneja [this message]
2017-04-07 8:37 ` Neil Armstrong
2017-04-07 9:10 ` Neil Armstrong
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=b78c6ac0-1c73-67c9-8f8b-d9442aff8f9c@codeaurora.org \
--to=architt@codeaurora.org \
--cc=Jose.Abreu@synopsys.com \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=narmstrong@baylibre.com \
/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
all inboxes | Powered by JetHome®