From: Dave Airlie Date: Wed, 26 Jul 2017 22:15:43 +0000 (+1000) Subject: Backmerge tag 'v4.13-rc2' into drm-next X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0eb2c0ae578ba00f97c7541e01abbce022d14909;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Backmerge tag 'v4.13-rc2' into drm-next Linux 4.13-rc2 This is required for drm-misc fixing. --- 0eb2c0ae578ba00f97c7541e01abbce022d14909 diff --cc MAINTAINERS index 9387e6aed3b8,f66488dfdbc9..a1e772e899ed --- a/MAINTAINERS +++ b/MAINTAINERS @@@ -4349,68 -4300,130 +4300,136 @@@ T: git git://anongit.freedesktop.org/dr S: Maintained F: drivers/gpu/drm/bochs/ - DRM DRIVER FOR QEMU'S CIRRUS DEVICE - M: Dave Airlie - M: Gerd Hoffmann - L: virtualization@lists.linux-foundation.org - T: git git://anongit.freedesktop.org/drm/drm-misc - S: Obsolete - W: https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/ - F: drivers/gpu/drm/cirrus/ + DRM DRIVER FOR INTEL I810 VIDEO CARDS + S: Orphan / Obsolete + F: drivers/gpu/drm/i810/ + F: include/uapi/drm/i810_drm.h - RADEON and AMDGPU DRM DRIVERS - M: Alex Deucher - M: Christian König - L: amd-gfx@lists.freedesktop.org - T: git git://people.freedesktop.org/~agd5f/linux - S: Supported - F: drivers/gpu/drm/radeon/ - F: include/uapi/drm/radeon_drm.h - F: drivers/gpu/drm/amd/ - F: include/uapi/drm/amdgpu_drm.h + DRM DRIVER FOR MATROX G200/G400 GRAPHICS CARDS + S: Orphan / Obsolete + F: drivers/gpu/drm/mga/ + F: include/uapi/drm/mga_drm.h - DRM PANEL DRIVERS - M: Thierry Reding + DRM DRIVER FOR MGA G200 SERVER GRAPHICS CHIPS + M: Dave Airlie + S: Odd Fixes + F: drivers/gpu/drm/mgag200/ + + DRM DRIVER FOR MI0283QT + M: Noralf Trønnes + S: Maintained + F: drivers/gpu/drm/tinydrm/mi0283qt.c + F: Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt + + DRM DRIVER FOR MSM ADRENO GPU + M: Rob Clark + L: linux-arm-msm@vger.kernel.org L: dri-devel@lists.freedesktop.org - T: git git://anongit.freedesktop.org/tegra/linux.git + L: freedreno@lists.freedesktop.org + T: git git://people.freedesktop.org/~robclark/linux S: Maintained - F: drivers/gpu/drm/drm_panel.c - F: drivers/gpu/drm/panel/ - F: include/drm/drm_panel.h - F: Documentation/devicetree/bindings/display/panel/ + F: drivers/gpu/drm/msm/ + F: include/uapi/drm/msm_drm.h + F: Documentation/devicetree/bindings/display/msm/ - INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets) - M: Daniel Vetter - M: Jani Nikula - L: intel-gfx@lists.freedesktop.org - W: https://01.org/linuxgraphics/ - B: https://01.org/linuxgraphics/documentation/how-report-bugs - C: irc://chat.freenode.net/intel-gfx - Q: http://patchwork.freedesktop.org/project/intel-gfx/ - T: git git://anongit.freedesktop.org/drm-intel + DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS + M: Ben Skeggs + L: dri-devel@lists.freedesktop.org + L: nouveau@lists.freedesktop.org + T: git git://github.com/skeggsb/linux S: Supported - F: drivers/gpu/drm/i915/ - F: include/drm/i915* - F: include/uapi/drm/i915_drm.h - F: Documentation/gpu/i915.rst + F: drivers/gpu/drm/nouveau/ + F: include/uapi/drm/nouveau_drm.h - INTEL GVT-g DRIVERS (Intel GPU Virtualization) - M: Zhenyu Wang - M: Zhi Wang - L: intel-gvt-dev@lists.freedesktop.org - L: intel-gfx@lists.freedesktop.org - W: https://01.org/igvt-g - T: git https://github.com/01org/gvt-linux.git - S: Supported - F: drivers/gpu/drm/i915/gvt/ + DRM DRIVER FOR QEMU'S CIRRUS DEVICE + M: Dave Airlie + M: Gerd Hoffmann + L: virtualization@lists.linux-foundation.org + T: git git://anongit.freedesktop.org/drm/drm-misc + S: Obsolete + W: https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/ + F: drivers/gpu/drm/cirrus/ - DRM DRIVERS FOR ATMEL HLCDC - M: Boris Brezillon + DRM DRIVER FOR QXL VIRTUAL GPU + M: Dave Airlie + M: Gerd Hoffmann + L: virtualization@lists.linux-foundation.org + T: git git://anongit.freedesktop.org/drm/drm-misc + S: Maintained + F: drivers/gpu/drm/qxl/ + F: include/uapi/drm/qxl_drm.h + ++DRM DRIVER FOR PERVASIVE DISPLAYS REPAPER PANELS ++M: Noralf Trønnes ++S: Maintained ++F: drivers/gpu/drm/tinydrm/repaper.c ++F: Documentation/devicetree/bindings/display/repaper.txt ++ + DRM DRIVER FOR RAGE 128 VIDEO CARDS + S: Orphan / Obsolete + F: drivers/gpu/drm/r128/ + F: include/uapi/drm/r128_drm.h + + DRM DRIVER FOR SAVAGE VIDEO CARDS + S: Orphan / Obsolete + F: drivers/gpu/drm/savage/ + F: include/uapi/drm/savage_drm.h + + DRM DRIVER FOR SIS VIDEO CARDS + S: Orphan / Obsolete + F: drivers/gpu/drm/sis/ + F: include/uapi/drm/sis_drm.h + + DRM DRIVER FOR TDFX VIDEO CARDS + S: Orphan / Obsolete + F: drivers/gpu/drm/tdfx/ + + DRM DRIVER FOR USB DISPLAYLINK VIDEO ADAPTERS + M: Dave Airlie + S: Odd Fixes + F: drivers/gpu/drm/udl/ + + DRM DRIVER FOR VMWARE VIRTUAL GPU + M: "VMware Graphics" + M: Sinclair Yeh + M: Thomas Hellstrom L: dri-devel@lists.freedesktop.org + T: git git://people.freedesktop.org/~syeh/repos_linux + T: git git://people.freedesktop.org/~thomash/linux S: Supported - F: drivers/gpu/drm/atmel-hlcdc/ - F: Documentation/devicetree/bindings/drm/atmel/ + F: drivers/gpu/drm/vmwgfx/ + F: include/uapi/drm/vmwgfx_drm.h + + DRM DRIVERS + M: David Airlie + L: dri-devel@lists.freedesktop.org + T: git git://people.freedesktop.org/~airlied/linux + B: https://bugs.freedesktop.org/ + C: irc://chat.freenode.net/dri-devel + S: Maintained + F: drivers/gpu/drm/ + F: drivers/gpu/vga/ + F: Documentation/devicetree/bindings/display/ + F: Documentation/devicetree/bindings/gpu/ + F: Documentation/devicetree/bindings/video/ + F: Documentation/gpu/ + F: include/drm/ + F: include/uapi/drm/ + F: include/linux/vga* + + DRM DRIVERS AND MISC GPU PATCHES + M: Daniel Vetter + M: Jani Nikula + M: Sean Paul + W: https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-misc.html + S: Maintained T: git git://anongit.freedesktop.org/drm/drm-misc + F: Documentation/gpu/ + F: drivers/gpu/vga/ + F: drivers/gpu/drm/* + F: include/drm/drm* + F: include/uapi/drm/drm* + F: include/linux/vga* DRM DRIVERS FOR ALLWINNER A10 M: Maxime Ripard diff --cc drivers/gpu/drm/vc4/vc4_crtc.c index 9e0c1500375c,a12cc7ea99b6..664a55b45af0 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@@ -519,23 -518,37 +519,51 @@@ static void vc4_crtc_atomic_disable(str WARN_ON_ONCE((HVS_READ(SCALER_DISPSTATX(chan)) & (SCALER_DISPSTATX_FULL | SCALER_DISPSTATX_EMPTY)) != SCALER_DISPSTATX_EMPTY); + + /* + * Make sure we issue a vblank event after disabling the CRTC if + * someone was waiting it. + */ + if (crtc->state->event) { + unsigned long flags; + + spin_lock_irqsave(&dev->event_lock, flags); + drm_crtc_send_vblank_event(crtc, crtc->state->event); + crtc->state->event = NULL; + spin_unlock_irqrestore(&dev->event_lock, flags); + } } + static void vc4_crtc_update_dlist(struct drm_crtc *crtc) + { + struct drm_device *dev = crtc->dev; + struct vc4_dev *vc4 = to_vc4_dev(dev); + struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); + struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc->state); + + if (crtc->state->event) { + unsigned long flags; + + crtc->state->event->pipe = drm_crtc_index(crtc); + + WARN_ON(drm_crtc_vblank_get(crtc) != 0); + + spin_lock_irqsave(&dev->event_lock, flags); + vc4_crtc->event = crtc->state->event; + crtc->state->event = NULL; + + HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel), + vc4_state->mm.start); + + spin_unlock_irqrestore(&dev->event_lock, flags); + } else { + HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel), + vc4_state->mm.start); + } + } + -static void vc4_crtc_enable(struct drm_crtc *crtc) +static void vc4_crtc_atomic_enable(struct drm_crtc *crtc, + struct drm_crtc_state *old_state) { struct drm_device *dev = crtc->dev; struct vc4_dev *vc4 = to_vc4_dev(dev); @@@ -556,22 -575,20 +590,19 @@@ /* Turn on the pixel valve, which will emit the vstart signal. */ CRTC_WRITE(PV_V_CONTROL, CRTC_READ(PV_V_CONTROL) | PV_VCONTROL_VIDEN); - - /* Enable vblank irq handling after crtc is started. */ - drm_crtc_vblank_on(crtc); } -static bool vc4_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) +static enum drm_mode_status vc4_crtc_mode_valid(struct drm_crtc *crtc, + const struct drm_display_mode *mode) { /* Do not allow doublescan modes from user space */ - if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN) { + if (mode->flags & DRM_MODE_FLAG_DBLSCAN) { DRM_DEBUG_KMS("[CRTC:%d] Doublescan mode rejected.\n", crtc->base.id); - return false; + return MODE_NO_DBLESCAN; } - return true; + return MODE_OK; } static int vc4_crtc_atomic_check(struct drm_crtc *crtc,