Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+48 -24
+1 -1
drivers/gpu/drm/exynos/Kconfig
··· 94 94 95 95 config DRM_EXYNOS_G2D 96 96 bool "G2D" 97 - depends on !VIDEO_SAMSUNG_S5P_G2D 97 + depends on VIDEO_SAMSUNG_S5P_G2D=n 98 98 select FRAME_VECTOR 99 99 help 100 100 Choose this option if you want to use Exynos G2D for DRM.
+3 -3
drivers/gpu/drm/exynos/Makefile
··· 2 2 # Makefile for the drm device driver. This driver provides support for the 3 3 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. 4 4 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 8 7 8 + exynosdrm-$(CONFIG_DRM_FBDEV_EMULATION) += exynos_drm_fbdev.o 9 9 exynosdrm-$(CONFIG_DRM_EXYNOS_IOMMU) += exynos_drm_iommu.o 10 10 exynosdrm-$(CONFIG_DRM_EXYNOS_FIMD) += exynos_drm_fimd.o 11 11 exynosdrm-$(CONFIG_DRM_EXYNOS5433_DECON) += exynos5433_drm_decon.o
+1 -1
drivers/gpu/drm/exynos/exynos_drm_core.c
··· 101 101 return 0; 102 102 103 103 err: 104 - list_for_each_entry_reverse(subdrv, &subdrv->list, list) { 104 + list_for_each_entry_continue_reverse(subdrv, &exynos_drm_subdrv_list, list) { 105 105 if (subdrv->close) 106 106 subdrv->close(dev, subdrv->dev, file); 107 107 }
-11
drivers/gpu/drm/exynos/exynos_drm_fb.c
··· 199 199 return exynos_fb->dma_addr[index]; 200 200 } 201 201 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 - 213 202 static const struct drm_mode_config_funcs exynos_drm_mode_config_funcs = { 214 203 .fb_create = exynos_user_fb_create, 215 204 .output_poll_changed = exynos_drm_output_poll_changed,
+11
drivers/gpu/drm/exynos/exynos_drm_fbdev.c
··· 317 317 318 318 drm_fb_helper_restore_fbdev_mode_unlocked(private->fb_helper); 319 319 } 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 + }
+22 -1
drivers/gpu/drm/exynos/exynos_drm_fbdev.h
··· 15 15 #ifndef _EXYNOS_DRM_FBDEV_H_ 16 16 #define _EXYNOS_DRM_FBDEV_H_ 17 17 18 + #ifdef CONFIG_DRM_FBDEV_EMULATION 19 + 18 20 int exynos_drm_fbdev_init(struct drm_device *dev); 19 - int exynos_drm_fbdev_reinit(struct drm_device *dev); 20 21 void exynos_drm_fbdev_fini(struct drm_device *dev); 21 22 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 22 43 23 44 #endif
+1 -1
drivers/gpu/drm/exynos/exynos_drm_fimd.c
··· 888 888 * clock. On these SoCs the bootloader may enable it but any 889 889 * power domain off/on will reset it to disable state. 890 890 */ 891 - if (ctx->driver_data != &exynos5_fimd_driver_data || 891 + if (ctx->driver_data != &exynos5_fimd_driver_data && 892 892 ctx->driver_data != &exynos5420_fimd_driver_data) 893 893 return; 894 894
+2 -1
drivers/gpu/drm/exynos/exynos_drm_mic.c
··· 129 129 } else 130 130 val &= ~(MIC0_RGB_MUX | MIC0_I80_MUX | MIC0_ON_MUX); 131 131 132 - regmap_write(mic->sysreg, DSD_CFG_MUX, val); 132 + ret = regmap_write(mic->sysreg, DSD_CFG_MUX, val); 133 133 if (ret) 134 134 DRM_ERROR("mic: Failed to read system register\n"); 135 135 } ··· 457 457 "samsung,disp-syscon"); 458 458 if (IS_ERR(mic->sysreg)) { 459 459 DRM_ERROR("mic: Failed to get system register.\n"); 460 + ret = PTR_ERR(mic->sysreg); 460 461 goto err; 461 462 } 462 463
+7 -5
drivers/gpu/drm/exynos/exynos_drm_plane.c
··· 11 11 12 12 #include <drm/drmP.h> 13 13 14 - #include <drm/exynos_drm.h> 15 - #include <drm/drm_plane_helper.h> 14 + #include <drm/drm_atomic.h> 16 15 #include <drm/drm_atomic_helper.h> 16 + #include <drm/drm_plane_helper.h> 17 + #include <drm/exynos_drm.h> 17 18 #include "exynos_drm_drv.h" 18 19 #include "exynos_drm_crtc.h" 19 20 #include "exynos_drm_fb.h" ··· 58 57 } 59 58 60 59 static void exynos_plane_mode_set(struct exynos_drm_plane_state *exynos_state) 61 - 62 60 { 63 61 struct drm_plane_state *state = &exynos_state->base; 64 - struct drm_crtc *crtc = exynos_state->base.crtc; 65 - struct drm_display_mode *mode = &crtc->state->adjusted_mode; 62 + struct drm_crtc *crtc = state->crtc; 63 + struct drm_crtc_state *crtc_state = 64 + drm_atomic_get_existing_crtc_state(state->state, crtc); 65 + struct drm_display_mode *mode = &crtc_state->adjusted_mode; 66 66 int crtc_x, crtc_y; 67 67 unsigned int crtc_w, crtc_h; 68 68 unsigned int src_x, src_y;