drm/bridge: anx6345: set correct BPC for display_info of connector
authorVasily Khoruzhick <anarsoul@gmail.com>
Sun, 29 Mar 2020 22:22:53 +0000 (15:22 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 May 2020 08:32:44 +0000 (10:32 +0200)
[ Upstream commit 1e8a6ce9186dbf342eebc07cf14cae5e82164e03 ]

Some drivers (e.g. sun4i-drm) need this info to decide whether they
need to enable dithering. Currently driver reports what panel supports
and if panel supports 8 we don't get dithering enabled.

Hardcode BPC to 6 for now since that's the only BPC
that driver supports.

Fixes: 6aa192698089 ("drm/bridge: Add Analogix anx6345 support")
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200329222253.2941405-1-anarsoul@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c

index 526507102c1ea06d239e5bf0adf6b8f1bc758fb6..8d32fea84c75e46537238ffced4f3a8d03e220f5 100644 (file)
@@ -485,6 +485,9 @@ static int anx6345_get_modes(struct drm_connector *connector)
 
        num_modes += drm_add_edid_modes(connector, anx6345->edid);
 
+       /* Driver currently supports only 6bpc */
+       connector->display_info.bpc = 6;
+
 unlock:
        if (power_off)
                anx6345_poweroff(anx6345);