video: ti: am335x: restore driver-model code
PATCH RESEND v3 1/1 video: ti: am335x: restore driver-model code
The commit 82f7b869f5d7a ("video: Drop CONFIG_AM335X_LCD") removed not only the LCD legacy implementation but also the code with driver model support. The patch restores the code with driver model support.
---
Changes in v3:
- Remove the lcd.h include which I forgot to commit in v2.
Changes in v2:
- Collapse the two patches into one only.
- Fix the compilation failure.
drivers/video/Kconfig | 2 + drivers/video/Makefile | 1 + drivers/video/ti/Kconfig | 8 + drivers/video/ti/Makefile | 6 + drivers/video/ti/tilcdc-panel.c | 172 +++++++++++++ drivers/video/ti/tilcdc-panel.h | 14 ++ drivers/video/ti/tilcdc.c | 425 ++++++++++++++++++++++++++++++++ drivers/video/ti/tilcdc.h | 38 +++ 8 files changed, 666 insertions(+) create mode 100644 drivers/video/ti/Kconfig create mode 100644 drivers/video/ti/Makefile create mode 100644 drivers/video/ti/tilcdc-panel.c create mode 100644 drivers/video/ti/tilcdc-panel.h create mode 100644 drivers/video/ti/tilcdc.c create mode 100644 drivers/video/ti/tilcdc.h
drivers/video/Kconfig +2 -0
@@ -576,6 +576,8 @@ config ATMEL_HLCD help HLCDC supports video output to an attached LCD panel. +source "drivers/video/ti/Kconfig" + source "drivers/video/exynos/Kconfig" config LOGICORE_DP_TX
drivers/video/Makefile +1 -0
@@ -26,6 +26,7 @@ obj-${CONFIG_EXYNOS_FB} += exynos/ obj-${CONFIG_VIDEO_ROCKCHIP} += rockchip/ obj-${CONFIG_VIDEO_STM32} += stm32/ obj-${CONFIG_VIDEO_TEGRA124} += tegra124/ +obj-y += ti/ obj-$(CONFIG_ATMEL_HLCD) += atmel_hlcdfb.o obj-$(CONFIG_ATMEL_LCD) += atmel_lcdfb.o
drivers/video/ti/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2020 Dario Binacchi <[email protected]> +# +config AM335X_LCD + bool "Enable AM335x video support" + help + Supports video output to an attached LCD panel.
drivers/video/ti/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2020 Dario Binacchi <[email protected]> +# + +obj-$(CONFIG_AM335X_LCD) += tilcdc.o tilcdc-panel.o
drivers/video/ti/tilcdc-panel.c new file +172 -0
172 lines not on this page · raw message
drivers/video/ti/tilcdc-panel.h new file +14 -0
@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2020 Dario Binacchi <[email protected]> +*/ + +#ifndef _TILCDC_PANEL_H +#define _TILCDC_PANEL_H + +#include "tilcdc.h" + +int tilcdc_panel_get_display_info (struct udevice *dev, +struct tilcdc_panel_info *info); + +#endif /* _TILCDC_PANEL_H */
drivers/video/ti/tilcdc.c new file +425 -0
425 lines not on this page · raw message
drivers/video/ti/tilcdc.h new file +38 -0
@@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2020 Dario Binacchi <[email protected]> +*/ + +#ifndef _TILCDC_H +#define _TILCDC_H + +/** +* tilcdc_panel_info: Panel parameters +* +* @ac_bias: AC Bias Pin Frequency +* @ac_bias_intrpt: AC Bias Pin Transitions per Interrupt +* @dma_burst_sz: DMA burst size +* @bpp: Bits per pixel +* @fdd: FIFO DMA Request Delay +* @tft_alt_mode: TFT Alternative Signal Mapping (Only for active) +* @invert_pxl_clk: Invert pixel clock +* @sync_edge: Horizontal and Vertical Sync Edge: 0=rising 1=falling +* @sync_ctrl: Horizontal and Vertical Sync: Control: 0=ignore +* @raster_order: Raster Data Order Select: 1=Most-to-least 0=Least-to-most +* @fifo_th: DMA FIFO threshold +*/ +struct tilcdc_panel_info { +u32 ac_bias; +u32 ac_bias_intrpt; +u32 dma_burst_sz; +u32 bpp; +u32 fdd; +bool tft_alt_mode; +bool invert_pxl_clk; +u32 sync_edge; +u32 sync_ctrl; +u32 raster_order; +u32 fifo_th; +}; + +#endif /* _TILCDC_H */
Signature · 1 line
2.32.0
Quoted 17 lines · On Sat, 28 Jan 2023 16:55:31 +0100 Dario Binacchi…
The commit
82f7b869f5d7a("video: DropCONFIG_AM335X_LCD") removed not only the LCD legacy implementation but also the code with driver model support. The patch restores the code with driver model support.Fixes 82f7b869f5d7a ("video: Drop CONFIG_AM335X_LCD")Signed-off-by Dario Binacchi <[email protected]>Reviewed-by Simon Glass <[email protected]>---
Changes in v3:
- Remove thelcd.hinclude which I forgot to commit in v2.Changes in v2:
- Collapse the two patches into one only.
- Fix the compilation failure.
Quoted 15 lines
drivers/video/Kconfig | 2 + drivers/video/Makefile | 1 + drivers/video/ti/Kconfig | 8 + drivers/video/ti/Makefile | 6 + drivers/video/ti/tilcdc-panel.c | 172 +++++++++++++ drivers/video/ti/tilcdc-panel.h | 14 ++ drivers/video/ti/tilcdc.c | 425 ++++++++++++++++++++++++++++++++ drivers/video/ti/tilcdc.h | 38 +++ 8 files changed, 666 insertions(+) create mode 100644 drivers/video/ti/Kconfig create mode 100644 drivers/video/ti/Makefile create mode 100644 drivers/video/ti/tilcdc-panel.c create mode 100644 drivers/video/ti/tilcdc-panel.h create mode 100644 drivers/video/ti/tilcdc.c create mode 100644 drivers/video/ti/tilcdc.h
applied to u-boot-video/master, thanks!
--
Anatolij