aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-05-14 09:47:30 -0400
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-05-14 09:47:30 -0400
commite7deb3c7741eaa558458696e55f57141886fcc5c (patch)
treed10b37d0a2c75c617ffc957ffda1e87a4f7d3c14
parent9076aa994a9e3b63ed9c79f5f46ffa2b5a001249 (diff)
drm: shmobile: remove unused MERAM support
Since commit a521422ea4ae ("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>
-rw-r--r--drivers/gpu/drm/shmobile/Kconfig1
-rw-r--r--drivers/gpu/drm/shmobile/shmob_drm_crtc.c42
-rw-r--r--drivers/gpu/drm/shmobile/shmob_drm_crtc.h1
-rw-r--r--drivers/gpu/drm/shmobile/shmob_drm_drv.h2
-rw-r--r--drivers/gpu/drm/shmobile/shmob_drm_kms.c11
-rw-r--r--drivers/gpu/drm/shmobile/shmob_drm_kms.h1
-rw-r--r--drivers/gpu/drm/shmobile/shmob_drm_plane.c2
-rw-r--r--include/linux/platform_data/shmob_drm.h4
8 files changed, 0 insertions, 64 deletions
diff --git a/drivers/gpu/drm/shmobile/Kconfig b/drivers/gpu/drm/shmobile/Kconfig
index c987c826daa3..0426d66660d1 100644
--- a/drivers/gpu/drm/shmobile/Kconfig
+++ b/drivers/gpu/drm/shmobile/Kconfig
@@ -2,7 +2,6 @@ config DRM_SHMOBILE
2 tristate "DRM Support for SH Mobile" 2 tristate "DRM Support for SH Mobile"
3 depends on DRM && ARM 3 depends on DRM && ARM
4 depends on ARCH_SHMOBILE || COMPILE_TEST 4 depends on ARCH_SHMOBILE || COMPILE_TEST
5 depends on FB_SH_MOBILE_MERAM || !FB_SH_MOBILE_MERAM
6 select BACKLIGHT_CLASS_DEVICE 5 select BACKLIGHT_CLASS_DEVICE
7 select BACKLIGHT_LCD_SUPPORT 6 select BACKLIGHT_LCD_SUPPORT
8 select DRM_KMS_HELPER 7 select DRM_KMS_HELPER
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
index e7738939a86d..40df8887fc17 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
@@ -21,8 +21,6 @@
21#include <drm/drm_gem_cma_helper.h> 21#include <drm/drm_gem_cma_helper.h>
22#include <drm/drm_plane_helper.h> 22#include <drm/drm_plane_helper.h>
23 23
24#include <video/sh_mobile_meram.h>
25
26#include "shmob_drm_backlight.h" 24#include "shmob_drm_backlight.h"
27#include "shmob_drm_crtc.h" 25#include "shmob_drm_crtc.h"
28#include "shmob_drm_drv.h" 26#include "shmob_drm_drv.h"
@@ -47,20 +45,12 @@ static int shmob_drm_clk_on(struct shmob_drm_device *sdev)
47 if (ret < 0) 45 if (ret < 0)
48 return ret; 46 return ret;
49 } 47 }
50#if 0
51 if (sdev->meram_dev && sdev->meram_dev->pdev)
52 pm_runtime_get_sync(&sdev->meram_dev->pdev->dev);
53#endif
54 48
55 return 0; 49 return 0;
56} 50}
57 51
58static void shmob_drm_clk_off(struct shmob_drm_device *sdev) 52static void shmob_drm_clk_off(struct shmob_drm_device *sdev)
59{ 53{
60#if 0
61 if (sdev->meram_dev && sdev->meram_dev->pdev)
62 pm_runtime_put_sync(&sdev->meram_dev->pdev->dev);
63#endif
64 if (sdev->clock) 54 if (sdev->clock)
65 clk_disable_unprepare(sdev->clock); 55 clk_disable_unprepare(sdev->clock);
66} 56}
@@ -269,12 +259,6 @@ static void shmob_drm_crtc_stop(struct shmob_drm_crtc *scrtc)
269 if (!scrtc->started) 259 if (!scrtc->started)
270 return; 260 return;
271 261
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
278 /* Stop the LCDC. */ 262 /* Stop the LCDC. */
279 shmob_drm_crtc_start_stop(scrtc, false); 263 shmob_drm_crtc_start_stop(scrtc, false);
280 264
@@ -305,7 +289,6 @@ static void shmob_drm_crtc_compute_base(struct shmob_drm_crtc *scrtc,
305{ 289{
306 struct drm_crtc *crtc = &scrtc->crtc; 290 struct drm_crtc *crtc = &scrtc->crtc;
307 struct drm_framebuffer *fb = crtc->primary->fb; 291 struct drm_framebuffer *fb = crtc->primary->fb;
308 struct shmob_drm_device *sdev = crtc->dev->dev_private;
309 struct drm_gem_cma_object *gem; 292 struct drm_gem_cma_object *gem;
310 unsigned int bpp; 293 unsigned int bpp;
311 294
@@ -321,11 +304,6 @@ static void shmob_drm_crtc_compute_base(struct shmob_drm_crtc *scrtc,
321 + y / (bpp == 4 ? 2 : 1) * fb->pitches[1] 304 + y / (bpp == 4 ? 2 : 1) * fb->pitches[1]
322 + x * (bpp == 16 ? 2 : 1); 305 + x * (bpp == 16 ? 2 : 1);
323 } 306 }
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]);
329} 307}
330 308
331static void shmob_drm_crtc_update_base(struct shmob_drm_crtc *scrtc) 309static 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,
372{ 350{
373 struct shmob_drm_crtc *scrtc = to_shmob_crtc(crtc); 351 struct shmob_drm_crtc *scrtc = to_shmob_crtc(crtc);
374 struct shmob_drm_device *sdev = crtc->dev->dev_private; 352 struct shmob_drm_device *sdev = crtc->dev->dev_private;
375 const struct sh_mobile_meram_cfg *mdata = sdev->pdata->meram;
376 const struct shmob_drm_format_info *format; 353 const struct shmob_drm_format_info *format;
377 void *cache;
378 354
379 format = shmob_drm_format_info(crtc->primary->fb->format->format); 355 format = shmob_drm_format_info(crtc->primary->fb->format->format);
380 if (format == NULL) { 356 if (format == NULL) {
@@ -386,24 +362,6 @@ static int shmob_drm_crtc_mode_set(struct drm_crtc *crtc,
386 scrtc->format = format; 362 scrtc->format = format;
387 scrtc->line_size = crtc->primary->fb->pitches[0]; 363 scrtc->line_size = crtc->primary->fb->pitches[0];
388 364
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
407 shmob_drm_crtc_compute_base(scrtc, x, y); 365 shmob_drm_crtc_compute_base(scrtc, x, y);
408 366
409 return 0; 367 return 0;
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.h b/drivers/gpu/drm/shmobile/shmob_drm_crtc.h
index f152973df11c..c11f421737dc 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.h
+++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.h
@@ -28,7 +28,6 @@ struct shmob_drm_crtc {
28 int dpms; 28 int dpms;
29 29
30 const struct shmob_drm_format_info *format; 30 const struct shmob_drm_format_info *format;
31 void *cache;
32 unsigned long dma[2]; 31 unsigned long dma[2];
33 unsigned int line_size; 32 unsigned int line_size;
34 bool started; 33 bool started;
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.h b/drivers/gpu/drm/shmobile/shmob_drm_drv.h
index 02ea315ba69a..088a6e55fa29 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_drv.h
+++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.h
@@ -23,7 +23,6 @@
23struct clk; 23struct clk;
24struct device; 24struct device;
25struct drm_device; 25struct drm_device;
26struct sh_mobile_meram_info;
27 26
28struct shmob_drm_device { 27struct shmob_drm_device {
29 struct device *dev; 28 struct device *dev;
@@ -31,7 +30,6 @@ struct shmob_drm_device {
31 30
32 void __iomem *mmio; 31 void __iomem *mmio;
33 struct clk *clock; 32 struct clk *clock;
34 struct sh_mobile_meram_info *meram;
35 u32 lddckr; 33 u32 lddckr;
36 u32 ldmt1r; 34 u32 ldmt1r;
37 35
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_kms.c b/drivers/gpu/drm/shmobile/shmob_drm_kms.c
index d36919b14da7..447638581c08 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_kms.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_kms.c
@@ -18,8 +18,6 @@
18#include <drm/drm_gem_cma_helper.h> 18#include <drm/drm_gem_cma_helper.h>
19#include <drm/drm_gem_framebuffer_helper.h> 19#include <drm/drm_gem_framebuffer_helper.h>
20 20
21#include <video/sh_mobile_meram.h>
22
23#include "shmob_drm_crtc.h" 21#include "shmob_drm_crtc.h"
24#include "shmob_drm_drv.h" 22#include "shmob_drm_drv.h"
25#include "shmob_drm_kms.h" 23#include "shmob_drm_kms.h"
@@ -35,55 +33,46 @@ static const struct shmob_drm_format_info shmob_drm_format_infos[] = {
35 .bpp = 16, 33 .bpp = 16,
36 .yuv = false, 34 .yuv = false,
37 .lddfr = LDDFR_PKF_RGB16, 35 .lddfr = LDDFR_PKF_RGB16,
38 .meram = SH_MOBILE_MERAM_PF_RGB,
39 }, { 36 }, {
40 .fourcc = DRM_FORMAT_RGB888, 37 .fourcc = DRM_FORMAT_RGB888,
41 .bpp = 24, 38 .bpp = 24,
42 .yuv = false, 39 .yuv = false,
43 .lddfr = LDDFR_PKF_RGB24, 40 .lddfr = LDDFR_PKF_RGB24,
44 .meram = SH_MOBILE_MERAM_PF_RGB,
45 }, { 41 }, {
46 .fourcc = DRM_FORMAT_ARGB8888, 42 .fourcc = DRM_FORMAT_ARGB8888,
47 .bpp = 32, 43 .bpp = 32,
48 .yuv = false, 44 .yuv = false,
49 .lddfr = LDDFR_PKF_ARGB32, 45 .lddfr = LDDFR_PKF_ARGB32,
50 .meram = SH_MOBILE_MERAM_PF_RGB,
51 }, { 46 }, {
52 .fourcc = DRM_FORMAT_NV12, 47 .fourcc = DRM_FORMAT_NV12,
53 .bpp = 12, 48 .bpp = 12,
54 .yuv = true, 49 .yuv = true,
55 .lddfr = LDDFR_CC | LDDFR_YF_420, 50 .lddfr = LDDFR_CC | LDDFR_YF_420,
56 .meram = SH_MOBILE_MERAM_PF_NV,
57 }, { 51 }, {
58 .fourcc = DRM_FORMAT_NV21, 52 .fourcc = DRM_FORMAT_NV21,
59 .bpp = 12, 53 .bpp = 12,
60 .yuv = true, 54 .yuv = true,
61 .lddfr = LDDFR_CC | LDDFR_YF_420, 55 .lddfr = LDDFR_CC | LDDFR_YF_420,
62 .meram = SH_MOBILE_MERAM_PF_NV,
63 }, { 56 }, {
64 .fourcc = DRM_FORMAT_NV16, 57 .fourcc = DRM_FORMAT_NV16,
65 .bpp = 16, 58 .bpp = 16,
66 .yuv = true, 59 .yuv = true,
67 .lddfr = LDDFR_CC | LDDFR_YF_422, 60 .lddfr = LDDFR_CC | LDDFR_YF_422,
68 .meram = SH_MOBILE_MERAM_PF_NV,
69 }, { 61 }, {
70 .fourcc = DRM_FORMAT_NV61, 62 .fourcc = DRM_FORMAT_NV61,
71 .bpp = 16, 63 .bpp = 16,
72 .yuv = true, 64 .yuv = true,
73 .lddfr = LDDFR_CC | LDDFR_YF_422, 65 .lddfr = LDDFR_CC | LDDFR_YF_422,
74 .meram = SH_MOBILE_MERAM_PF_NV,
75 }, { 66 }, {
76 .fourcc = DRM_FORMAT_NV24, 67 .fourcc = DRM_FORMAT_NV24,
77 .bpp = 24, 68 .bpp = 24,
78 .yuv = true, 69 .yuv = true,
79 .lddfr = LDDFR_CC | LDDFR_YF_444, 70 .lddfr = LDDFR_CC | LDDFR_YF_444,
80 .meram = SH_MOBILE_MERAM_PF_NV24,
81 }, { 71 }, {
82 .fourcc = DRM_FORMAT_NV42, 72 .fourcc = DRM_FORMAT_NV42,
83 .bpp = 24, 73 .bpp = 24,
84 .yuv = true, 74 .yuv = true,
85 .lddfr = LDDFR_CC | LDDFR_YF_444, 75 .lddfr = LDDFR_CC | LDDFR_YF_444,
86 .meram = SH_MOBILE_MERAM_PF_NV24,
87 }, 76 },
88}; 77};
89 78
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_kms.h b/drivers/gpu/drm/shmobile/shmob_drm_kms.h
index 06d5b7caa026..753e2817dc2c 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_kms.h
+++ b/drivers/gpu/drm/shmobile/shmob_drm_kms.h
@@ -24,7 +24,6 @@ struct shmob_drm_format_info {
24 unsigned int bpp; 24 unsigned int bpp;
25 bool yuv; 25 bool yuv;
26 u32 lddfr; 26 u32 lddfr;
27 unsigned int meram;
28}; 27};
29 28
30const struct shmob_drm_format_info *shmob_drm_format_info(u32 fourcc); 29const struct shmob_drm_format_info *shmob_drm_format_info(u32 fourcc);
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_plane.c b/drivers/gpu/drm/shmobile/shmob_drm_plane.c
index 97f6e4a3eb0d..1d0359f713ca 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_plane.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_plane.c
@@ -17,8 +17,6 @@
17#include <drm/drm_fb_cma_helper.h> 17#include <drm/drm_fb_cma_helper.h>
18#include <drm/drm_gem_cma_helper.h> 18#include <drm/drm_gem_cma_helper.h>
19 19
20#include <video/sh_mobile_meram.h>
21
22#include "shmob_drm_drv.h" 20#include "shmob_drm_drv.h"
23#include "shmob_drm_kms.h" 21#include "shmob_drm_kms.h"
24#include "shmob_drm_plane.h" 22#include "shmob_drm_plane.h"
diff --git a/include/linux/platform_data/shmob_drm.h b/include/linux/platform_data/shmob_drm.h
index 7c686d335c12..ee495d707f17 100644
--- a/include/linux/platform_data/shmob_drm.h
+++ b/include/linux/platform_data/shmob_drm.h
@@ -18,9 +18,6 @@
18 18
19#include <drm/drm_mode.h> 19#include <drm/drm_mode.h>
20 20
21struct sh_mobile_meram_cfg;
22struct sh_mobile_meram_info;
23
24enum shmob_drm_clk_source { 21enum shmob_drm_clk_source {
25 SHMOB_DRM_CLK_BUS, 22 SHMOB_DRM_CLK_BUS,
26 SHMOB_DRM_CLK_PERIPHERAL, 23 SHMOB_DRM_CLK_PERIPHERAL,
@@ -93,7 +90,6 @@ struct shmob_drm_platform_data {
93 struct shmob_drm_interface_data iface; 90 struct shmob_drm_interface_data iface;
94 struct shmob_drm_panel_data panel; 91 struct shmob_drm_panel_data panel;
95 struct shmob_drm_backlight_data backlight; 92 struct shmob_drm_backlight_data backlight;
96 const struct sh_mobile_meram_cfg *meram;
97}; 93};
98 94
99#endif /* __SHMOB_DRM_H__ */ 95#endif /* __SHMOB_DRM_H__ */