[PATCH 04/14] video: nexell: Drop unused and invalid code
Stefan Bosch
stefan_b at posteo.net
Mon Jan 31 17:57:30 CET 2022
Hi Simon,
please find below the patch of your patch 04/14 (diff after applying
your hole patch-series and my changes).
diff --git a/arch/arm/mach-nexell/include/mach/display_dev.h
b/arch/arm/mach-nexell/include/mach/display_dev.h
index 39b28ca1..f24fb173 100644
--- a/arch/arm/mach-nexell/include/mach/display_dev.h
+++ b/arch/arm/mach-nexell/include/mach/display_dev.h
@@ -8,15 +8,12 @@
#ifndef _NX__DISPLAY_DEV_H_
#define _NX__DISPLAY_DEV_H_
-#if defined CONFIG_DM_VIDEO
-#elif defined CONFIG_LCD
+#if !defined(CONFIG_DM_VIDEO) && defined(CONFIG_LCD)
#include <lcd.h>
#endif
struct nx_display_dev {
-#if defined CONFIG_DM_VIDEO
- /* GraphicDevice graphic_device; -- not defined anymore */
-#elif defined CONFIG_LCD
+#if !defined(CONFIG_DM_VIDEO) && defined(CONFIG_LCD)
vidinfo_t *panel_info;
#endif
unsigned long base;
diff --git a/drivers/video/nexell_display.c b/drivers/video/nexell_display.c
index 2179e413..090fd6ea 100644
--- a/drivers/video/nexell_display.c
+++ b/drivers/video/nexell_display.c
@@ -562,7 +562,6 @@ static int nx_display_probe(struct udevice *dev)
}
struct nx_display_dev *dp;
- /* unsigned int pp_index = 0; */
dp = nx_display_setup();
if (!dp) {
@@ -572,9 +571,7 @@ static int nx_display_probe(struct udevice *dev)
}
switch (dp->depth) {
-#if 0 /* GDF_16BIT_565RGB is not defined in video.h */
case 2:
- pp_index = GDF_16BIT_565RGB;
uc_priv->bpix = VIDEO_BPP16;
break;
case 3:
@@ -582,10 +579,8 @@ static int nx_display_probe(struct udevice *dev)
* type video_log2_bpp
*/
case 4:
- pp_index = GDF_32BIT_X888RGB;
uc_priv->bpix = VIDEO_BPP32;
break;
-#endif
default:
printf("fail : not support LCD bit per pixel %d\n",
dp->depth * 8);
Regards
Stefan
On 23.01.22 15:04, Simon Glass wrote:
> Unfortunately this driver uses the old video structure to store things.
> This is not supported with driver model.
>
> Drop the old code and comment out the other pieces, so the maintainer can
> take a look.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> arch/arm/mach-nexell/include/mach/display_dev.h | 4 ++--
> drivers/video/nexell_display.c | 14 +++-----------
> 2 files changed, 5 insertions(+), 13 deletions(-)
>
> diff --git a/arch/arm/mach-nexell/include/mach/display_dev.h b/arch/arm/mach-nexell/include/mach/display_dev.h
> index 77eb614768c..0dd96f67957 100644
> --- a/arch/arm/mach-nexell/include/mach/display_dev.h
> +++ b/arch/arm/mach-nexell/include/mach/display_dev.h
> @@ -15,8 +15,8 @@
> #endif
>
> struct nx_display_dev {
> -#if defined CONFIG_VIDEO || defined CONFIG_DM_VIDEO
> - GraphicDevice graphic_device;
> +#if defined CONFIG_DM_VIDEO
> + /* GraphicDevice graphic_device; -- not defined anymore */
> #elif defined CONFIG_LCD
> vidinfo_t *panel_info;
> #endif
> diff --git a/drivers/video/nexell_display.c b/drivers/video/nexell_display.c
> index c7621ef49c5..a0bd44c8b84 100644
> --- a/drivers/video/nexell_display.c
> +++ b/drivers/video/nexell_display.c
> @@ -537,7 +537,6 @@ static int nx_display_probe(struct udevice *dev)
> struct video_uc_plat *uc_plat = dev_get_uclass_plat(dev);
> struct video_priv *uc_priv = dev_get_uclass_priv(dev);
> struct nx_display_plat *plat = dev_get_plat(dev);
> - static GraphicDevice *graphic_device;
> char addr[64];
>
> debug("%s()\n", __func__);
> @@ -564,7 +563,7 @@ static int nx_display_probe(struct udevice *dev)
> }
>
> struct nx_display_dev *dp;
> - unsigned int pp_index = 0;
> + /* unsigned int pp_index = 0; */
>
> dp = nx_display_setup();
> if (!dp) {
> @@ -574,6 +573,7 @@ static int nx_display_probe(struct udevice *dev)
> }
>
> switch (dp->depth) {
> +#if 0 /* GDF_16BIT_565RGB is not defined in video.h */
> case 2:
> pp_index = GDF_16BIT_565RGB;
> uc_priv->bpix = VIDEO_BPP16;
> @@ -586,6 +586,7 @@ static int nx_display_probe(struct udevice *dev)
> pp_index = GDF_32BIT_X888RGB;
> uc_priv->bpix = VIDEO_BPP32;
> break;
> +#endif
> default:
> printf("fail : not support LCD bit per pixel %d\n",
> dp->depth * 8);
> @@ -596,15 +597,6 @@ static int nx_display_probe(struct udevice *dev)
> uc_priv->ysize = dp->fb_plane->height;
> uc_priv->rot = 0;
>
> - graphic_device = &dp->graphic_device;
> - graphic_device->frameAdrs = dp->fb_addr;
> - graphic_device->gdfIndex = pp_index;
> - graphic_device->gdfBytesPP = dp->depth;
> - graphic_device->winSizeX = dp->fb_plane->width;
> - graphic_device->winSizeY = dp->fb_plane->height;
> - graphic_device->plnSizeX =
> - graphic_device->winSizeX * graphic_device->gdfBytesPP;
> -
> /*
> * set environment variable "fb_addr" (frame buffer address), required
> * for splash image. Because drv_video_init() in common/stdio.c is only
More information about the U-Boot
mailing list