
Some patches were part of other linux-mainline kernel versions but are not anymore part of the current 4.19.76. Move 0001-Enable-uart3-for-NanoPi-Neo-Air-used-by-BT.patch in linux-mainline_4.19.76.bbappend to avoid error patching file arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts Hunk #2 FAILED at 162. 1 out of 2 hunks FAILED -- rejects in file arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts Place all patches from Armbian in a separate directory and do all the Balena specific operations in linux-mainline_%.bbappend only. Changelog-entry: Remove unused patches and cleanup Signed-off-by: Vicentiu Galanopulo <vicentiu@balena.io>
58 lines
2 KiB
Diff
58 lines
2 KiB
Diff
From 4690963a2d219abac912ebe2f0b22529c028db06 Mon Sep 17 00:00:00 2001
|
|
From: Vasily Khoruzhick <anarsoul@gmail.com>
|
|
Date: Sun, 28 Oct 2018 15:32:38 -0700
|
|
Subject: [PATCH 123/146] drm/sun4i: tcon: enable dithering on tcon0 is there's
|
|
bridge connected
|
|
|
|
RGB on A64 is 6bpc, so if bridge is connected we need to enable dithering
|
|
|
|
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
|
|
---
|
|
drivers/gpu/drm/sun4i/sun4i_tcon.c | 14 ++++++++------
|
|
1 file changed, 8 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
|
|
index 1b28fd9c2908..891ba4dbbf10 100644
|
|
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
|
|
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
|
|
@@ -283,10 +283,6 @@ static void sun4i_tcon0_mode_set_dithering(struct sun4i_tcon *tcon,
|
|
u32 bus_format = 0;
|
|
u32 val = 0;
|
|
|
|
- /* XXX Would this ever happen? */
|
|
- if (!connector)
|
|
- return;
|
|
-
|
|
/*
|
|
* FIXME: Undocumented bits
|
|
*
|
|
@@ -304,11 +300,15 @@ static void sun4i_tcon0_mode_set_dithering(struct sun4i_tcon *tcon,
|
|
regmap_write(tcon->regs, SUN4I_TCON0_FRM_TBL2_REG, 0x57575555);
|
|
regmap_write(tcon->regs, SUN4I_TCON0_FRM_TBL3_REG, 0x7f7f7777);
|
|
|
|
+ /* Do dithering if there's bridge connected */
|
|
+ if (!connector)
|
|
+ val |= SUN4I_TCON0_FRM_CTL_EN;
|
|
+
|
|
/* Do dithering if panel only supports 6 bits per color */
|
|
- if (connector->display_info.bpc == 6)
|
|
+ if (connector && connector->display_info.bpc == 6)
|
|
val |= SUN4I_TCON0_FRM_CTL_EN;
|
|
|
|
- if (connector->display_info.num_bus_formats == 1)
|
|
+ if (connector && connector->display_info.num_bus_formats == 1)
|
|
bus_format = connector->display_info.bus_formats[0];
|
|
|
|
/* Check the connection format */
|
|
@@ -492,6 +492,8 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon,
|
|
/* Set dithering if needed */
|
|
if (tcon->panel)
|
|
sun4i_tcon0_mode_set_dithering(tcon, tcon->panel->connector);
|
|
+ else
|
|
+ sun4i_tcon0_mode_set_dithering(tcon, NULL);
|
|
|
|
/* Adjust clock delay */
|
|
clk_delay = sun4i_tcon_get_clk_delay(mode, 0);
|
|
--
|
|
2.17.1
|
|
|