Skip to content

Commit 9076aa9

Browse files
committed
video: fbdev: sh_mobile_lcdcfb: remove unused MERAM support
Since commit a521422 ("ARM: shmobile: mackerel: Remove Legacy C board code") MERAM functionality is unused. Remove it. Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Acked-by: Daniel Vetter <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
1 parent 745f8c1 commit 9076aa9

File tree

4 files changed

+1
-67
lines changed

4 files changed

+1
-67
lines changed

drivers/video/fbdev/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1888,7 +1888,6 @@ config FB_W100
18881888
config FB_SH_MOBILE_LCDC
18891889
tristate "SuperH Mobile LCDC framebuffer support"
18901890
depends on FB && (SUPERH || ARCH_RENESAS) && HAVE_CLK
1891-
depends on FB_SH_MOBILE_MERAM || !FB_SH_MOBILE_MERAM
18921891
select FB_SYS_FILLRECT
18931892
select FB_SYS_COPYAREA
18941893
select FB_SYS_IMAGEBLIT

drivers/video/fbdev/sh_mobile_lcdcfb.c

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <linux/vmalloc.h>
3030

3131
#include <video/sh_mobile_lcdc.h>
32-
#include <video/sh_mobile_meram.h>
3332

3433
#include "sh_mobile_lcdcfb.h"
3534

@@ -217,7 +216,6 @@ struct sh_mobile_lcdc_priv {
217216
struct notifier_block notifier;
218217
int started;
219218
int forced_fourcc; /* 2 channel LCDC must share fourcc setting */
220-
struct sh_mobile_meram_info *meram_dev;
221219
};
222220

223221
/* -----------------------------------------------------------------------------
@@ -346,16 +344,12 @@ static void sh_mobile_lcdc_clk_on(struct sh_mobile_lcdc_priv *priv)
346344
if (priv->dot_clk)
347345
clk_prepare_enable(priv->dot_clk);
348346
pm_runtime_get_sync(priv->dev);
349-
if (priv->meram_dev && priv->meram_dev->pdev)
350-
pm_runtime_get_sync(&priv->meram_dev->pdev->dev);
351347
}
352348
}
353349

354350
static void sh_mobile_lcdc_clk_off(struct sh_mobile_lcdc_priv *priv)
355351
{
356352
if (atomic_sub_return(1, &priv->hw_usecnt) == -1) {
357-
if (priv->meram_dev && priv->meram_dev->pdev)
358-
pm_runtime_put_sync(&priv->meram_dev->pdev->dev);
359353
pm_runtime_put(priv->dev);
360354
if (priv->dot_clk)
361355
clk_disable_unprepare(priv->dot_clk);
@@ -1073,7 +1067,6 @@ static void __sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
10731067

10741068
static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
10751069
{
1076-
struct sh_mobile_meram_info *mdev = priv->meram_dev;
10771070
struct sh_mobile_lcdc_chan *ch;
10781071
unsigned long tmp;
10791072
int ret;
@@ -1106,9 +1099,6 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
11061099

11071100
/* Compute frame buffer base address and pitch for each channel. */
11081101
for (k = 0; k < ARRAY_SIZE(priv->ch); k++) {
1109-
int pixelformat;
1110-
void *cache;
1111-
11121102
ch = &priv->ch[k];
11131103
if (!ch->enabled)
11141104
continue;
@@ -1117,45 +1107,6 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
11171107
ch->base_addr_c = ch->dma_handle
11181108
+ ch->xres_virtual * ch->yres_virtual;
11191109
ch->line_size = ch->pitch;
1120-
1121-
/* Enable MERAM if possible. */
1122-
if (mdev == NULL || ch->cfg->meram_cfg == NULL)
1123-
continue;
1124-
1125-
/* Free the allocated MERAM cache. */
1126-
if (ch->cache) {
1127-
sh_mobile_meram_cache_free(mdev, ch->cache);
1128-
ch->cache = NULL;
1129-
}
1130-
1131-
switch (ch->format->fourcc) {
1132-
case V4L2_PIX_FMT_NV12:
1133-
case V4L2_PIX_FMT_NV21:
1134-
case V4L2_PIX_FMT_NV16:
1135-
case V4L2_PIX_FMT_NV61:
1136-
pixelformat = SH_MOBILE_MERAM_PF_NV;
1137-
break;
1138-
case V4L2_PIX_FMT_NV24:
1139-
case V4L2_PIX_FMT_NV42:
1140-
pixelformat = SH_MOBILE_MERAM_PF_NV24;
1141-
break;
1142-
case V4L2_PIX_FMT_RGB565:
1143-
case V4L2_PIX_FMT_BGR24:
1144-
case V4L2_PIX_FMT_BGR32:
1145-
default:
1146-
pixelformat = SH_MOBILE_MERAM_PF_RGB;
1147-
break;
1148-
}
1149-
1150-
cache = sh_mobile_meram_cache_alloc(mdev, ch->cfg->meram_cfg,
1151-
ch->pitch, ch->yres, pixelformat,
1152-
&ch->line_size);
1153-
if (!IS_ERR(cache)) {
1154-
sh_mobile_meram_cache_update(mdev, cache,
1155-
ch->base_addr_y, ch->base_addr_c,
1156-
&ch->base_addr_y, &ch->base_addr_c);
1157-
ch->cache = cache;
1158-
}
11591110
}
11601111

11611112
for (k = 0; k < ARRAY_SIZE(priv->overlays); ++k) {
@@ -1223,13 +1174,6 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
12231174
}
12241175

12251176
sh_mobile_lcdc_display_off(ch);
1226-
1227-
/* Free the MERAM cache. */
1228-
if (ch->cache) {
1229-
sh_mobile_meram_cache_free(priv->meram_dev, ch->cache);
1230-
ch->cache = NULL;
1231-
}
1232-
12331177
}
12341178

12351179
/* stop the lcdc */
@@ -1851,11 +1795,6 @@ static int sh_mobile_lcdc_pan(struct fb_var_screeninfo *var,
18511795
base_addr_c = ch->dma_handle + ch->xres_virtual * ch->yres_virtual
18521796
+ c_offset;
18531797

1854-
if (ch->cache)
1855-
sh_mobile_meram_cache_update(priv->meram_dev, ch->cache,
1856-
base_addr_y, base_addr_c,
1857-
&base_addr_y, &base_addr_c);
1858-
18591798
ch->base_addr_y = base_addr_y;
18601799
ch->base_addr_c = base_addr_c;
18611800
ch->pan_y_offset = y_offset;
@@ -2718,7 +2657,7 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev)
27182657
return -ENOMEM;
27192658

27202659
priv->dev = &pdev->dev;
2721-
priv->meram_dev = pdata->meram_dev;
2660+
27222661
for (i = 0; i < ARRAY_SIZE(priv->ch); i++)
27232662
mutex_init(&priv->ch[i].open_lock);
27242663
platform_set_drvdata(pdev, priv);

drivers/video/fbdev/sh_mobile_lcdcfb.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ struct sh_mobile_lcdc_chan {
6161
unsigned long *reg_offs;
6262
unsigned long ldmt1r_value;
6363
unsigned long enabled; /* ME and SE in LDCNT2R */
64-
void *cache;
6564

6665
struct mutex open_lock; /* protects the use counter */
6766
int use_count;

include/video/sh_mobile_lcdc.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#define __ASM_SH_MOBILE_LCDC_H__
44

55
#include <linux/fb.h>
6-
#include <video/sh_mobile_meram.h>
76

87
/* Register definitions */
98
#define _LDDCKR 0x410
@@ -184,7 +183,6 @@ struct sh_mobile_lcdc_chan_cfg {
184183
struct sh_mobile_lcdc_panel_cfg panel_cfg;
185184
struct sh_mobile_lcdc_bl_info bl_info;
186185
struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */
187-
const struct sh_mobile_meram_cfg *meram_cfg;
188186

189187
struct platform_device *tx_dev; /* HDMI/DSI transmitter device */
190188
};
@@ -193,7 +191,6 @@ struct sh_mobile_lcdc_info {
193191
int clock_source;
194192
struct sh_mobile_lcdc_chan_cfg ch[2];
195193
struct sh_mobile_lcdc_overlay_cfg overlays[4];
196-
struct sh_mobile_meram_info *meram_dev;
197194
};
198195

199196
#endif /* __ASM_SH_MOBILE_LCDC_H__ */

0 commit comments

Comments
 (0)