AR-1 - Adding support category for distributions AR-4 - Remove Allwinner legacy AR-5 - Drop Udoo family and move Udoo board into newly created imx6 family AR-9 - Rename sunxi-next to sunxi-legacy AR-10 - Rename sunxi-dev to sunxi-current AR-11 - Adding Radxa Rockpi S support AR-13 - Rename rockchip64-default to rockchip64-legacy AR-14 - Add rockchip64-current as mainline source AR-15 - Drop Rockchip 4.19.y NEXT, current become 5.3.y AR-16 - Rename RK3399 default to legacy AR-17 - Rename Odroid XU4 next and default to legacy 4.14.y, add DEV 5.4.y AR-18 - Add Odroid N2 current mainline AR-19 - Move Odroid C1 to meson family AR-20 - Rename mvebu64-default to mvebu64-legacy AR-21 - Rename mvebu-default to mvebu-legacy AR-22 - Rename mvebu-next to mvebu-current AR-23 - Drop meson64 default and next, current becomes former DEV 5.3.y AR-24 - Drop cubox family and move Cubox/Hummingboard boards under imx6 AR-26 - Adjust motd AR-27 - Enabling distribution release status AR-28 - Added new GCC compilers AR-29 - Implementing Ubuntu Eoan AR-30 - Add desktop packages per board or family AR-31 - Remove (Ubuntu/Debian) distribution name from image filename AR-32 - Move arch configs from configuration.sh to separate arm64 and armhf config files AR-33 - Revision numbers for beta builds changed to day_in_the_year AR-34 - Patches support linked patches AR-35 - Break meson64 family into gxbb and gxl AR-36 - Add Nanopineo2 Black AR-38 - Upgrade option from old branches to new one via armbian-config AR-41 - Show full timezone info AR-43 - Merge Odroid N2 to meson64 AR-44 - Enable FORCE_BOOTSCRIPT_UPDATE for all builds
67 lines
2.5 KiB
Diff
67 lines
2.5 KiB
Diff
From af6d185a66b416cb714fb3f1602e8e3f5ca46632 Mon Sep 17 00:00:00 2001
|
|
From: Chen-Yu Tsai <wens@csie.org>
|
|
Date: Fri, 7 Sep 2018 12:19:43 +0800
|
|
Subject: [PATCH 087/146] drm/sun4i: tcon: Pass drm_encoder * into
|
|
sun4i_tcon0_mode_set_cpu
|
|
|
|
sun4i_tcon0_mode_set_cpu() currently accepts struct mipi_dsi_device *
|
|
as its second parameter. This is derived from drm_encoder.
|
|
|
|
The DSI encoder is tied to the CPU interface mode of the TCON as a
|
|
special case. In theory, if hardware were available, we could also
|
|
support normal CPU interface modes. It is better to pass the generic
|
|
encoder instead of the specialized mipi_dsi_device, and handle the
|
|
differences inside the function.
|
|
|
|
Passing the encoder would also enable the function to pass it, or any
|
|
other data structures related to it, to other functions expecting it.
|
|
One such example would be dithering support that will be added in a
|
|
later patch, which looks at properties tied to the connector to
|
|
determine whether dithering should be enabled or not.
|
|
|
|
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
|
|
---
|
|
drivers/gpu/drm/sun4i/sun4i_tcon.c | 15 ++++++---------
|
|
1 file changed, 6 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
|
|
index 3fb084f802e2..52e1150612ba 100644
|
|
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
|
|
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
|
|
@@ -276,9 +276,12 @@ static void sun4i_tcon0_mode_set_common(struct sun4i_tcon *tcon,
|
|
}
|
|
|
|
static void sun4i_tcon0_mode_set_cpu(struct sun4i_tcon *tcon,
|
|
- struct mipi_dsi_device *device,
|
|
+ const struct drm_encoder *encoder,
|
|
const struct drm_display_mode *mode)
|
|
{
|
|
+ /* TODO support normal CPU interface modes */
|
|
+ struct sun6i_dsi *dsi = encoder_to_sun6i_dsi(encoder);
|
|
+ struct mipi_dsi_device *device = dsi->device;
|
|
u8 bpp = mipi_dsi_pixel_format_to_bpp(device->format);
|
|
u8 lanes = device->lanes;
|
|
u32 block_space, start_delay;
|
|
@@ -581,16 +584,10 @@ void sun4i_tcon_mode_set(struct sun4i_tcon *tcon,
|
|
const struct drm_encoder *encoder,
|
|
const struct drm_display_mode *mode)
|
|
{
|
|
- struct sun6i_dsi *dsi;
|
|
-
|
|
switch (encoder->encoder_type) {
|
|
case DRM_MODE_ENCODER_DSI:
|
|
- /*
|
|
- * This is not really elegant, but it's the "cleaner"
|
|
- * way I could think of...
|
|
- */
|
|
- dsi = encoder_to_sun6i_dsi(encoder);
|
|
- sun4i_tcon0_mode_set_cpu(tcon, dsi->device, mode);
|
|
+ /* DSI is tied to special case of CPU interface */
|
|
+ sun4i_tcon0_mode_set_cpu(tcon, encoder, mode);
|
|
break;
|
|
case DRM_MODE_ENCODER_LVDS:
|
|
sun4i_tcon0_mode_set_lvds(tcon, encoder, mode);
|
|
--
|
|
2.17.1
|
|
|