Skip to content

Commit e7deb3c

Browse files
committed
drm: shmobile: 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 <horms+renesas@verge.net.au> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
1 parent 9076aa9 commit e7deb3c

File tree

8 files changed

+0
-64
lines changed

8 files changed

+0
-64
lines changed

drivers/gpu/drm/shmobile/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ config DRM_SHMOBILE
22
tristate "DRM Support for SH Mobile"
33
depends on DRM && ARM
44
depends on ARCH_SHMOBILE || COMPILE_TEST
5-
depends on FB_SH_MOBILE_MERAM || !FB_SH_MOBILE_MERAM
65
select BACKLIGHT_CLASS_DEVICE
76
select BACKLIGHT_LCD_SUPPORT
87
select DRM_KMS_HELPER

drivers/gpu/drm/shmobile/shmob_drm_crtc.c

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
#include <drm/drm_gem_cma_helper.h>
2222
#include <drm/drm_plane_helper.h>
2323

24-
#include <video/sh_mobile_meram.h>
25-
2624
#include "shmob_drm_backlight.h"
2725
#include "shmob_drm_crtc.h"
2826
#include "shmob_drm_drv.h"
@@ -47,20 +45,12 @@ static int shmob_drm_clk_on(struct shmob_drm_device *sdev)
4745
if (ret < 0)
4846
return ret;
4947
}
50-
#if 0
51-
if (sdev->meram_dev && sdev->meram_dev->pdev)
52-
pm_runtime_get_sync(&sdev->meram_dev->pdev->dev);
53-
#endif
5448

5549
return 0;
5650
}
5751

5852
static void shmob_drm_clk_off(struct shmob_drm_device *sdev)
5953
{
60-
#if 0
61-
if (sdev->meram_dev && sdev->meram_dev->pdev)
62-
pm_runtime_put_sync(&sdev->meram_dev->pdev->dev);
63-
#endif
6454
if (sdev->clock)
6555
clk_disable_unprepare(sdev->clock);
6656
}
@@ -269,12 +259,6 @@ static void shmob_drm_crtc_stop(struct shmob_drm_crtc *scrtc)
269259
if (!scrtc->started)
270260
return;
271261

272-
/* Disable the MERAM cache. */
273-
if (scrtc->cache) {
274-
sh_mobile_meram_cache_free(sdev->meram, scrtc->cache);
275-
scrtc->cache = NULL;
276-
}
277-
278262
/* Stop the LCDC. */
279263
shmob_drm_crtc_start_stop(scrtc, false);
280264

@@ -305,7 +289,6 @@ static void shmob_drm_crtc_compute_base(struct shmob_drm_crtc *scrtc,
305289
{
306290
struct drm_crtc *crtc = &scrtc->crtc;
307291
struct drm_framebuffer *fb = crtc->primary->fb;
308-
struct shmob_drm_device *sdev = crtc->dev->dev_private;
309292
struct drm_gem_cma_object *gem;
310293
unsigned int bpp;
311294

@@ -321,11 +304,6 @@ static void shmob_drm_crtc_compute_base(struct shmob_drm_crtc *scrtc,
321304
+ y / (bpp == 4 ? 2 : 1) * fb->pitches[1]
322305
+ x * (bpp == 16 ? 2 : 1);
323306
}
324-
325-
if (scrtc->cache)
326-
sh_mobile_meram_cache_update(sdev->meram, scrtc->cache,
327-
scrtc->dma[0], scrtc->dma[1],
328-
&scrtc->dma[0], &scrtc->dma[1]);
329307
}
330308

331309
static void shmob_drm_crtc_update_base(struct shmob_drm_crtc *scrtc)
@@ -372,9 +350,7 @@ static int shmob_drm_crtc_mode_set(struct drm_crtc *crtc,
372350
{
373351
struct shmob_drm_crtc *scrtc = to_shmob_crtc(crtc);
374352
struct shmob_drm_device *sdev = crtc->dev->dev_private;
375-
const struct sh_mobile_meram_cfg *mdata = sdev->pdata->meram;
376353
const struct shmob_drm_format_info *format;
377-
void *cache;
378354

379355
format = shmob_drm_format_info(crtc->primary->fb->format->format);
380356
if (format == NULL) {
@@ -386,24 +362,6 @@ static int shmob_drm_crtc_mode_set(struct drm_crtc *crtc,
386362
scrtc->format = format;
387363
scrtc->line_size = crtc->primary->fb->pitches[0];
388364

389-
if (sdev->meram) {
390-
/* Enable MERAM cache if configured. We need to de-init
391-
* configured ICBs before we can re-initialize them.
392-
*/
393-
if (scrtc->cache) {
394-
sh_mobile_meram_cache_free(sdev->meram, scrtc->cache);
395-
scrtc->cache = NULL;
396-
}
397-
398-
cache = sh_mobile_meram_cache_alloc(sdev->meram, mdata,
399-
crtc->primary->fb->pitches[0],
400-
adjusted_mode->vdisplay,
401-
format->meram,
402-
&scrtc->line_size);
403-
if (!IS_ERR(cache))
404-
scrtc->cache = cache;
405-
}
406-
407365
shmob_drm_crtc_compute_base(scrtc, x, y);
408366

409367
return 0;

drivers/gpu/drm/shmobile/shmob_drm_crtc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ struct shmob_drm_crtc {
2828
int dpms;
2929

3030
const struct shmob_drm_format_info *format;
31-
void *cache;
3231
unsigned long dma[2];
3332
unsigned int line_size;
3433
bool started;

drivers/gpu/drm/shmobile/shmob_drm_drv.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@
2323
struct clk;
2424
struct device;
2525
struct drm_device;
26-
struct sh_mobile_meram_info;
2726

2827
struct shmob_drm_device {
2928
struct device *dev;
3029
const struct shmob_drm_platform_data *pdata;
3130

3231
void __iomem *mmio;
3332
struct clk *clock;
34-
struct sh_mobile_meram_info *meram;
3533
u32 lddckr;
3634
u32 ldmt1r;
3735

drivers/gpu/drm/shmobile/shmob_drm_kms.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#include <drm/drm_gem_cma_helper.h>
1919
#include <drm/drm_gem_framebuffer_helper.h>
2020

21-
#include <video/sh_mobile_meram.h>
22-
2321
#include "shmob_drm_crtc.h"
2422
#include "shmob_drm_drv.h"
2523
#include "shmob_drm_kms.h"
@@ -35,55 +33,46 @@ static const struct shmob_drm_format_info shmob_drm_format_infos[] = {
3533
.bpp = 16,
3634
.yuv = false,
3735
.lddfr = LDDFR_PKF_RGB16,
38-
.meram = SH_MOBILE_MERAM_PF_RGB,
3936
}, {
4037
.fourcc = DRM_FORMAT_RGB888,
4138
.bpp = 24,
4239
.yuv = false,
4340
.lddfr = LDDFR_PKF_RGB24,
44-
.meram = SH_MOBILE_MERAM_PF_RGB,
4541
}, {
4642
.fourcc = DRM_FORMAT_ARGB8888,
4743
.bpp = 32,
4844
.yuv = false,
4945
.lddfr = LDDFR_PKF_ARGB32,
50-
.meram = SH_MOBILE_MERAM_PF_RGB,
5146
}, {
5247
.fourcc = DRM_FORMAT_NV12,
5348
.bpp = 12,
5449
.yuv = true,
5550
.lddfr = LDDFR_CC | LDDFR_YF_420,
56-
.meram = SH_MOBILE_MERAM_PF_NV,
5751
}, {
5852
.fourcc = DRM_FORMAT_NV21,
5953
.bpp = 12,
6054
.yuv = true,
6155
.lddfr = LDDFR_CC | LDDFR_YF_420,
62-
.meram = SH_MOBILE_MERAM_PF_NV,
6356
}, {
6457
.fourcc = DRM_FORMAT_NV16,
6558
.bpp = 16,
6659
.yuv = true,
6760
.lddfr = LDDFR_CC | LDDFR_YF_422,
68-
.meram = SH_MOBILE_MERAM_PF_NV,
6961
}, {
7062
.fourcc = DRM_FORMAT_NV61,
7163
.bpp = 16,
7264
.yuv = true,
7365
.lddfr = LDDFR_CC | LDDFR_YF_422,
74-
.meram = SH_MOBILE_MERAM_PF_NV,
7566
}, {
7667
.fourcc = DRM_FORMAT_NV24,
7768
.bpp = 24,
7869
.yuv = true,
7970
.lddfr = LDDFR_CC | LDDFR_YF_444,
80-
.meram = SH_MOBILE_MERAM_PF_NV24,
8171
}, {
8272
.fourcc = DRM_FORMAT_NV42,
8373
.bpp = 24,
8474
.yuv = true,
8575
.lddfr = LDDFR_CC | LDDFR_YF_444,
86-
.meram = SH_MOBILE_MERAM_PF_NV24,
8776
},
8877
};
8978

drivers/gpu/drm/shmobile/shmob_drm_kms.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ struct shmob_drm_format_info {
2424
unsigned int bpp;
2525
bool yuv;
2626
u32 lddfr;
27-
unsigned int meram;
2827
};
2928

3029
const struct shmob_drm_format_info *shmob_drm_format_info(u32 fourcc);

drivers/gpu/drm/shmobile/shmob_drm_plane.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#include <drm/drm_fb_cma_helper.h>
1818
#include <drm/drm_gem_cma_helper.h>
1919

20-
#include <video/sh_mobile_meram.h>
21-
2220
#include "shmob_drm_drv.h"
2321
#include "shmob_drm_kms.h"
2422
#include "shmob_drm_plane.h"

include/linux/platform_data/shmob_drm.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818

1919
#include <drm/drm_mode.h>
2020

21-
struct sh_mobile_meram_cfg;
22-
struct sh_mobile_meram_info;
23-
2421
enum shmob_drm_clk_source {
2522
SHMOB_DRM_CLK_BUS,
2623
SHMOB_DRM_CLK_PERIPHERAL,
@@ -93,7 +90,6 @@ struct shmob_drm_platform_data {
9390
struct shmob_drm_interface_data iface;
9491
struct shmob_drm_panel_data panel;
9592
struct shmob_drm_backlight_data backlight;
96-
const struct sh_mobile_meram_cfg *meram;
9793
};
9894

9995
#endif /* __SHMOB_DRM_H__ */

0 commit comments

Comments
 (0)