Skip to content

Commit ff3e84e

Browse files
committed
Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
fix some exynos regressions. * 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: Use VIDEO_SAMSUNG_S5P_G2D=n as G2D Kconfig dependency drm/exynos: fix a warning message drm/exynos: mic: fix an error code drm/exynos: fimd: fix broken dp_clock control drm/exynos: build fbdev code conditionally drm/exynos: fix adjusted_mode pointer in exynos_plane_mode_set drm/exynos: fix error handling in exynos_drm_subdrv_open
2 parents 25451c1 + 2072fe5 commit ff3e84e

File tree

9 files changed

+48
-24
lines changed

9 files changed

+48
-24
lines changed

drivers/gpu/drm/exynos/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ comment "Sub-drivers"
9494

9595
config DRM_EXYNOS_G2D
9696
bool "G2D"
97-
depends on !VIDEO_SAMSUNG_S5P_G2D
97+
depends on VIDEO_SAMSUNG_S5P_G2D=n
9898
select FRAME_VECTOR
9999
help
100100
Choose this option if you want to use Exynos G2D for DRM.

drivers/gpu/drm/exynos/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# Makefile for the drm device driver. This driver provides support for the
33
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
44

5-
exynosdrm-y := exynos_drm_drv.o exynos_drm_crtc.o exynos_drm_fbdev.o \
6-
exynos_drm_fb.o exynos_drm_gem.o exynos_drm_core.o \
7-
exynos_drm_plane.o
5+
exynosdrm-y := exynos_drm_drv.o exynos_drm_crtc.o exynos_drm_fb.o \
6+
exynos_drm_gem.o exynos_drm_core.o exynos_drm_plane.o
87

8+
exynosdrm-$(CONFIG_DRM_FBDEV_EMULATION) += exynos_drm_fbdev.o
99
exynosdrm-$(CONFIG_DRM_EXYNOS_IOMMU) += exynos_drm_iommu.o
1010
exynosdrm-$(CONFIG_DRM_EXYNOS_FIMD) += exynos_drm_fimd.o
1111
exynosdrm-$(CONFIG_DRM_EXYNOS5433_DECON) += exynos5433_drm_decon.o

drivers/gpu/drm/exynos/exynos_drm_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ int exynos_drm_subdrv_open(struct drm_device *dev, struct drm_file *file)
101101
return 0;
102102

103103
err:
104-
list_for_each_entry_reverse(subdrv, &subdrv->list, list) {
104+
list_for_each_entry_continue_reverse(subdrv, &exynos_drm_subdrv_list, list) {
105105
if (subdrv->close)
106106
subdrv->close(dev, subdrv->dev, file);
107107
}

drivers/gpu/drm/exynos/exynos_drm_fb.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,6 @@ dma_addr_t exynos_drm_fb_dma_addr(struct drm_framebuffer *fb, int index)
199199
return exynos_fb->dma_addr[index];
200200
}
201201

202-
static void exynos_drm_output_poll_changed(struct drm_device *dev)
203-
{
204-
struct exynos_drm_private *private = dev->dev_private;
205-
struct drm_fb_helper *fb_helper = private->fb_helper;
206-
207-
if (fb_helper)
208-
drm_fb_helper_hotplug_event(fb_helper);
209-
else
210-
exynos_drm_fbdev_init(dev);
211-
}
212-
213202
static const struct drm_mode_config_funcs exynos_drm_mode_config_funcs = {
214203
.fb_create = exynos_user_fb_create,
215204
.output_poll_changed = exynos_drm_output_poll_changed,

drivers/gpu/drm/exynos/exynos_drm_fbdev.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,3 +317,14 @@ void exynos_drm_fbdev_restore_mode(struct drm_device *dev)
317317

318318
drm_fb_helper_restore_fbdev_mode_unlocked(private->fb_helper);
319319
}
320+
321+
void exynos_drm_output_poll_changed(struct drm_device *dev)
322+
{
323+
struct exynos_drm_private *private = dev->dev_private;
324+
struct drm_fb_helper *fb_helper = private->fb_helper;
325+
326+
if (fb_helper)
327+
drm_fb_helper_hotplug_event(fb_helper);
328+
else
329+
exynos_drm_fbdev_init(dev);
330+
}

drivers/gpu/drm/exynos/exynos_drm_fbdev.h

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,30 @@
1515
#ifndef _EXYNOS_DRM_FBDEV_H_
1616
#define _EXYNOS_DRM_FBDEV_H_
1717

18+
#ifdef CONFIG_DRM_FBDEV_EMULATION
19+
1820
int exynos_drm_fbdev_init(struct drm_device *dev);
19-
int exynos_drm_fbdev_reinit(struct drm_device *dev);
2021
void exynos_drm_fbdev_fini(struct drm_device *dev);
2122
void exynos_drm_fbdev_restore_mode(struct drm_device *dev);
23+
void exynos_drm_output_poll_changed(struct drm_device *dev);
24+
25+
#else
26+
27+
static inline int exynos_drm_fbdev_init(struct drm_device *dev)
28+
{
29+
return 0;
30+
}
31+
32+
static inline void exynos_drm_fbdev_fini(struct drm_device *dev)
33+
{
34+
}
35+
36+
static inline void exynos_drm_fbdev_restore_mode(struct drm_device *dev)
37+
{
38+
}
39+
40+
#define exynos_drm_output_poll_changed (NULL)
41+
42+
#endif
2243

2344
#endif

drivers/gpu/drm/exynos/exynos_drm_fimd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ static void fimd_dp_clock_enable(struct exynos_drm_crtc *crtc, bool enable)
888888
* clock. On these SoCs the bootloader may enable it but any
889889
* power domain off/on will reset it to disable state.
890890
*/
891-
if (ctx->driver_data != &exynos5_fimd_driver_data ||
891+
if (ctx->driver_data != &exynos5_fimd_driver_data &&
892892
ctx->driver_data != &exynos5420_fimd_driver_data)
893893
return;
894894

drivers/gpu/drm/exynos/exynos_drm_mic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static void mic_set_path(struct exynos_mic *mic, bool enable)
129129
} else
130130
val &= ~(MIC0_RGB_MUX | MIC0_I80_MUX | MIC0_ON_MUX);
131131

132-
regmap_write(mic->sysreg, DSD_CFG_MUX, val);
132+
ret = regmap_write(mic->sysreg, DSD_CFG_MUX, val);
133133
if (ret)
134134
DRM_ERROR("mic: Failed to read system register\n");
135135
}
@@ -457,6 +457,7 @@ static int exynos_mic_probe(struct platform_device *pdev)
457457
"samsung,disp-syscon");
458458
if (IS_ERR(mic->sysreg)) {
459459
DRM_ERROR("mic: Failed to get system register.\n");
460+
ret = PTR_ERR(mic->sysreg);
460461
goto err;
461462
}
462463

drivers/gpu/drm/exynos/exynos_drm_plane.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111

1212
#include <drm/drmP.h>
1313

14-
#include <drm/exynos_drm.h>
15-
#include <drm/drm_plane_helper.h>
14+
#include <drm/drm_atomic.h>
1615
#include <drm/drm_atomic_helper.h>
16+
#include <drm/drm_plane_helper.h>
17+
#include <drm/exynos_drm.h>
1718
#include "exynos_drm_drv.h"
1819
#include "exynos_drm_crtc.h"
1920
#include "exynos_drm_fb.h"
@@ -57,11 +58,12 @@ static int exynos_plane_get_size(int start, unsigned length, unsigned last)
5758
}
5859

5960
static void exynos_plane_mode_set(struct exynos_drm_plane_state *exynos_state)
60-
6161
{
6262
struct drm_plane_state *state = &exynos_state->base;
63-
struct drm_crtc *crtc = exynos_state->base.crtc;
64-
struct drm_display_mode *mode = &crtc->state->adjusted_mode;
63+
struct drm_crtc *crtc = state->crtc;
64+
struct drm_crtc_state *crtc_state =
65+
drm_atomic_get_existing_crtc_state(state->state, crtc);
66+
struct drm_display_mode *mode = &crtc_state->adjusted_mode;
6567
int crtc_x, crtc_y;
6668
unsigned int crtc_w, crtc_h;
6769
unsigned int src_x, src_y;

0 commit comments

Comments
 (0)