summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drm/amd: drop use of drmP.h in display/Sam Ravnborg2019-06-105-6/+3
| | | | | | | | | | | | | Drop all uses of drmP.h in drm/amd/display/. Fix fallout. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-9-sam@ravnborg.org
* drm/amd: drop use of drmP.h in powerplay/Sam Ravnborg2019-06-101-2/+2
| | | | | | | | | | | | Delete the only include of drmP.h in powerplay/. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-8-sam@ravnborg.org
* drm/amd: drop use of drmP.h from all header filesSam Ravnborg2019-06-103-4/+8
| | | | | | | | | | | | | | | | | Drop use of the deprecated drmP.h header file from all amd header files. This makes it a more smooth process to get rid of drmP.h in the .c files. Added include files and forwards as appropriate. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-7-sam@ravnborg.org
* drm/amd: drop use of drmP.h in atom.hSam Ravnborg2019-06-107-2/+15
| | | | | | | | | | | | | | Drop use of the deprecated drmP.h header from atom.h Fix fallout in various files. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-6-sam@ravnborg.org
* drm/amd: drop use of drmP.h in amdgpu.hSam Ravnborg2019-06-1019-3/+38
| | | | | | | | | | | | | Delete the unused drmP.h from amdgpu.h. Fix fallout in various files. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-5-sam@ravnborg.org
* drm/amd: drop use of drmp.h in os_types.hSam Ravnborg2019-06-1044-3/+86
| | | | | | | | | | | | | | | Drop use of the deprecated drmP.h from display/dc/os_types.h Fix all fallout after this change. Most of the fixes was adding a missing include of vmalloc.h. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-4-sam@ravnborg.org
* drm/amd: drop dependencies on drm_os_linux.hSam Ravnborg2019-06-1036-28/+90
| | | | | | | | | | | | | | | | | Fix so no files in drm/amd/ depends on the deprecated drm_os_linux.h header file. It was done manually: - remove drm_os_linux.h from drmP.h - fix all build errros Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-3-sam@ravnborg.org
* drm: fix build errors with drm_print.hSam Ravnborg2019-06-101-0/+2
| | | | | | | | | | | | | | drm_print.h requires <drm/drm.h> to fix build when macros are used. Pull in the header file in drm_print.h so users do not have to do it. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Sean Paul <sean@poorly.run> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-2-sam@ravnborg.org
* drm/radeon: drop use of drmP.h (2/2)Sam Ravnborg2019-06-1057-147/+216
| | | | | | | | | | | | | Drop use of drmP.h in remaining .c files. To ease review a little the drmP.h removal was divided in two commits. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-8-sam@ravnborg.org
* drm/radeon: drop use of drmP.h (1/2)Sam Ravnborg2019-06-1044-112/+221
| | | | | | | | | | | | | Drop use of drmP.h in all .c files named radeon*c. To ease review a little drmP.h removal was divided in two commits. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-7-sam@ravnborg.org
* drm/radeon: prepare header files for drmP.h removalSam Ravnborg2019-06-1010-1/+19
| | | | | | | | | | | | | | | While removing drmP.h from all .c files the list of header files are also sorted alphabetically. To allow this adjust the header files to pull in the dependencies they needed to allow this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-6-sam@ravnborg.org
* drm/radeon: drop drmP.h from header filesSam Ravnborg2019-06-103-3/+2
| | | | | | | | | | | | | | To ease conversion of .c files drop include of drmP.h from all header files. And fix-up build errors caused by this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-5-sam@ravnborg.org
* drm/radeon: drop dependency on drm_os_linux.hSam Ravnborg2019-06-1013-23/+30
| | | | | | | | | | | | | | | | The drm_os_linux.h header file is deprecated. Drop all uses of symbols from this file. All macros are just opencoded. A few adjustments to include files was required as the obsolete drm_os_linux.h included these headers. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-4-sam@ravnborg.org
* drm: drm_debugfs.h self-containedSam Ravnborg2019-06-101-0/+2
| | | | | | | | | | | | | | | | | While removing drmP.h from drm/radeon a few files ended up including drm_debugfs.h as the first file. This failed build due to missing dependencies in drm_debugfs.h. Add the missing include files. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Sean Paul <sean@poorly.run> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-3-sam@ravnborg.org
* drm: drm_crtc.h self-containedSam Ravnborg2019-06-101-0/+1
| | | | | | | | | | | | | | | | | While removing drmP.h from drm/radeon a few files ended up including drm_crtc.h as the first file. This failed build due to a missing dependency in drm_crtc.h. Add the missing include file. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Sean Paul <sean@poorly.run> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-2-sam@ravnborg.org
* drm/bridge/synopsys: dw-hdmi: Fix unwedge crash when no pinctrl entriesDouglas Anderson2019-06-101-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | In commit 50f9495efe30 ("drm/bridge/synopsys: dw-hdmi: Add "unwedge" for ddc bus") I stupidly used IS_ERR() to check for whether we have an "unwedge" pinctrl state even though on most flows through the driver the unwedge state will just be NULL. Fix it so that we consistently use NULL for no unwedge state. Fixes: 50f9495efe30 ("drm/bridge/synopsys: dw-hdmi: Add "unwedge" for ddc bus") Cc: Douglas Anderson <dianders@chromium.org> Cc: Sean Paul <seanpaul@chromium.org> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Jonas Karlman <jonas@kwiboo.se> Cc: Jernej Skrabec <jernej.skrabec@siol.net> Cc: Sam Ravnborg <sam@ravnborg.org> Reported-by: Erico Nunes <nunes.erico@gmail.com> Signed-off-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190610175234.196844-1-dianders@chromium.org
* dma-fence: Signal all callbacks from dma_fence_release()Chris Wilson2019-06-091-2/+19
| | | | | | | | | | | | This is an illegal scenario, to free the fence whilst there are pending callbacks. Currently, we emit a WARN and then cast aside the callbacks leaving them dangling. Alternatively, we could set an error on the fence and then signal fence so that any dependency chains from the fence can be tidied up, and if they care they can check for the error. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190609110002.31915-1-chris@chris-wilson.co.uk
* drm/fb-helper: Move out commit codeNoralf Trønnes2019-06-083-282/+292
| | | | | | | | | | | | Move the modeset commit code to drm_client_modeset. No changes except exporting API. v7: Export drm_client_panel_rotation() (Gerd Hoffmann) v2: Move to drm_client_modeset.c instead of drm_client.c Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190531140117.37751-5-noralf@tronnes.org
* drm/fb-helper: Prepare to move out commit codeNoralf Trønnes2019-06-081-41/+81
| | | | | | | | | This makes the necessary changes so the commit code can be moved out to drm_client as-is in the next patch. It's split up to ease review. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190531140117.37751-4-noralf@tronnes.org
* drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()Noralf Trønnes2019-06-084-168/+175
| | | | | | | | | | | | | | | | | | Prepare for moving drm_fb_helper modesetting code to drm_client. drm_client will be linked to drm.ko, so move __drm_atomic_helper_disable_plane() and __drm_atomic_helper_set_config() out of drm_kms_helper.ko. While at it, fix two checkpatch complaints: - WARNING: Block comments use a trailing */ on a separate line - CHECK: Alignment should match open parenthesis v7: Declare drm_mode_set and drm_plane_state Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190531140117.37751-2-noralf@tronnes.org
* drm/crc-debugfs: Also sprinkle irqrestore over early exitsDaniel Vetter2019-06-071-2/+2
| | | | | | | | | | | | | | | | | I. was. blind. Caught with vkms, which has some really slow crc computation function. Fixes: 1882018a70e0 ("drm/crc-debugfs: User irqsafe spinlock in drm_crtc_add_crc_entry") Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Emil Velikov <emil.velikov@collabora.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190606211544.5389-1-daniel.vetter@ffwll.ch
* drm/bridge: sii902x: fix comparision of u32 with less than zeroColin Ian King2019-06-071-1/+1
| | | | | | | | | | | | | | The less than check for the variable num_lanes is always going to be false because the variable is a u32. Fix this by making num_lanes an int and also make loop index i an int too. Addresses-Coverity: ("Unsigned compared against 0") Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Jyri Sarha <jsarha@ti.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190603142102.27191-1-colin.king@canonical.com
* drm/bridge: sii902x: re-order conditions to prevent out of bounds readDan Carpenter2019-06-071-2/+2
| | | | | | | | | | | This should check that "i" is within bounds before checking reading from the array. Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190607072704.GA25229@mwanda
* drm/stm: support runtime power managementYannick Fertré2019-06-072-24/+86
| | | | | | | | | | | | | This patch enables runtime power management (runtime PM) support for the display controller. pm_runtime_enable() and pm_runtime_disable() are added during ltdc load and unload respectively. pm_runtime_get_sync() and pm_runtime_put_sync() are added for ltdc register access. Signed-off-by: Yannick Fertré <yannick.fertre@st.com> Acked-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/1559550722-14091-1-git-send-email-yannick.fertre@st.com
* drm/stm: ltdc: No message if probeYannick Fertré2019-06-071-1/+1
| | | | | | | | | Print display controller hardware version in debug mode only. Signed-off-by: Yannick Fertré <yannick.fertre@st.com> Acked-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/1559550694-14042-1-git-send-email-yannick.fertre@st.com
* drm/meson: Add support for XBGR8888 & ABGR8888 formatsNeil Armstrong2019-06-071-0/+16
| | | | | | | | | Add missing XBGR8888 & ABGR8888 formats variants from the primary plane. Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller") Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190429075238.7884-1-narmstrong@baylibre.com
* drm/meson: Add zpos immutable property to planesNeil Armstrong2019-06-072-0/+6
| | | | | | | | | | Add immutable zpos property to primary and overlay planes to specify the current fixed zpos position. Fixes: f9a2348196d1 ("drm/meson: Support Overlay plane for video rendering") Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190429075247.7946-1-narmstrong@baylibre.com
* drm/vkms: Forward timer right after drm_crtc_handle_vblankDaniel Vetter2019-06-061-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit def35e7c592616bc09be328de8795e5e624a3cf8 Author: Shayenne Moura <shayenneluzmoura@gmail.com> Date: Wed Jan 30 14:06:36 2019 -0200 drm/vkms: Bugfix extra vblank frame we fixed the vblank counter to give accurate results outside of drm_crtc_handle_vblank, which fixed bugs around vblank timestamps being off-by-one and causing the vblank counter to jump when it shouldn't. The trouble is that this completely broke crc generation. Shayenne and Rodrigo tracked this down to the vblank timestamp going backwards in time somehow. Which then resulted in an underflow in drm_vblank.c code, which resulted in all kinds of things breaking really badly. The reason for this is that once we've called drm_crtc_handle_vblank and the hrtimer isn't forwarded yet, we're returning a vblank timestamp in the past. This race is really hard to hit since it's small, except when you enable crc generation: In that case there's a call to drm_crtc_accurate_vblank right in-betwen, so we're guaranteed to hit the bug. The fix is to roll the hrtimer forward _before_ we do the vblank processing (which has a side-effect of incrementing the vblank counter), and we always subtract one frame from the hrtimer - since now it's always one frame in the future. To make sure we don't hit this again also add a WARN_ON checking for whether our timestamp is somehow moving into the past, which is never should. This also aligns more with how real hw works: 1. first all registers are updated with the new timestamp/vblank counter values. 2. then an interrupt is generated 3. kernel interrupt handler eventually fires. So doing this aligns vkms closer with what drm_vblank.c expects. Document this also in a comment. Cc: Shayenne Moura <shayenneluzmoura@gmail.com> Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Tested-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190606084404.12014-1-daniel.vetter@ffwll.ch
* drm/vkms: Remove useless call to drm_connector_register/unregister()Rodrigo Siqueira2019-06-061-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The function vkms_output_init() is invoked during the module initialization, and it handles the creation/configuration of the vkms essential elements (e.g., connectors, encoder, etc). Among the initializations, this function tries to initialize a connector and register it by calling drm_connector_register(). However, inside the drm_connector_register(), at the beginning of this function there is the following validation: if (!connector->dev->registered) return 0; In this sense, invoke drm_connector_register() after initializing the connector has no effect because the register field is false. The connector register happens when drm_dev_register() is invoked; the same issue exists with drm_connector_unregister(). Therefore, this commit removes the unnecessary call to drm_connector_register() and drm_connector_unregister(). Changes since v2: * Remove unnecessary call to drm_connector_unregister() * Remove unused label Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190315161142.23gfu32lueyqrmyq@smtp.gmail.com
* drm/sti: drop use of drmP.hSam Ravnborg2019-06-0625-23/+85
| | | | | | | | | | | | | | | | | Stop using the deprecated drmP.h header file. Replaced with relevant forwards or headers files. Header files sorted in all files touched. Build tested with allyesconfig, allmodconfig for a number of architectures. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190605134835.25112-2-sam@ravnborg.org
* drm/edid: Ignore "DFP 1.x" bit for EDID 1.2 and earlierVille Syrjälä2019-06-061-2/+2
| | | | | | | | | | | | | | | | From VESA EDID implementation guide v1.0: "For EDID version 1 revision 2 or earlier data structures when offset 14h bit 7 is set to one, the value of bits 6-0 are undefined, and therefore cannot be interpreted to mean anything." And since EDID 1.4 redefines that bit let's consult it only for EDID 1.3. Cc: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190529110204.2384-2-ville.syrjala@linux.intel.com Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
* drm/edid: Clean up DRM_EDID_DIGITAL_* flagsVille Syrjälä2019-06-062-16/+18
| | | | | | | | | | | Give the "DFP 1.x" bit a proper name, and clean up the rest of the bits defines as well. Cc: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190529110204.2384-1-ville.syrjala@linux.intel.com Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
* drm: panel-orientation-quirks: Add quirk for GPD MicroPCHans de Goede2019-06-061-0/+16
| | | | | | | | | | | | | GPD has done it again, make a nice device (good), use way too generic DMI strings (bad) and use a portrait screen rotated 90 degrees (ugly). Because of the too generic DMI strings this entry is also doing bios-date matching, so the gpd_micropc data struct may very well need to be updated with some extra bios-dates in the future. Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190524125759.14131-2-hdegoede@redhat.com
* drm: panel-orientation-quirks: Add quirk for GPD pocket2Hans de Goede2019-06-061-0/+16
| | | | | | | | | | | | | | | | | | GPD has done it again, make a nice device (good), use way too generic DMI strings (bad) and use a portrait screen rotated 90 degrees (ugly). Because of the too generic DMI strings this entry is also doing bios-date matching, so the gpd_pocket2 data struct may very well need to be updated with some extra bios-dates in the future. Changes in v2: -Add one more known BIOS date to the list of BIOS dates Cc: Jurgen Kramer <gtmkramer@xs4all.nl> Reported-by: Jurgen Kramer <gtmkramer@xs4all.nl> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190524125759.14131-1-hdegoede@redhat.com
* drm/crc-debugfs: User irqsafe spinlock in drm_crtc_add_crc_entryDaniel Vetter2019-06-061-2/+3
| | | | | | | | | | | | | | | | We can be called from any context, we need to be prepared. Noticed this while hacking on vkms, which calls this function from a normal worker. Which really upsets lockdep. Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Emil Velikov <emil.velikov@collabora.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190605194556.16744-1-daniel.vetter@ffwll.ch
* drm: Ignore drm_gem_vram_mm_funcs in generated documentationThomas Zimmermann2019-06-061-1/+1
| | | | | | | | | | | | The documentation tools interpret drm_gem_vram_mm_funcs as function and there appears to be no way of inline-documenting constants. This results in a warning by 'make htmldocs'. For now, removing drm_gem_vram_mm_funcs from generated documentation works around the issue. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: http://patchwork.freedesktop.org/patch/msgid/20190604111330.25324-1-tzimmermann@suse.de Fixes: 5c9dcacfe566 ("drm: Add default instance for VRAM MM callback functions") Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* drm/virtio: Fix cache entry creation race.David Riley2019-06-061-1/+21
| | | | | | | | | | | | | | | | | | | virtio_gpu_cmd_get_capset would check for the existence of an entry under lock. If it was not found, it would unlock and call virtio_gpu_cmd_get_capset to create a new entry. The new entry would be added it to the list without checking if it was added by another task during the period where the lock was not held resulting in duplicate entries. Compounding this issue, virtio_gpu_cmd_capset_cb would stop iterating after find the first matching entry. Multiple callbacks would modify the first entry, but any subsequent entries and their associated waiters would eventually timeout since they don't become valid, also wasting memory along the way. Signed-off-by: David Riley <davidriley@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20190605234423.11348-3-davidriley@chromium.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* drm/virtio: Wake up all waiters when capset response comes in.David Riley2019-06-061-1/+1
| | | | | | | | If multiple callers occur simultaneously, wake them all up. Signed-off-by: David Riley <davidriley@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20190605234423.11348-2-davidriley@chromium.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* drm/virtio: Ensure cached capset entries are valid before copying.David Riley2019-06-061-2/+1
| | | | | | | | | | | | virtio_gpu_get_caps_ioctl could return success with invalid data if a second caller to the function occurred after the entry was created in virtio_gpu_cmd_get_capset but prior to the virtio_gpu_cmd_capset_cb callback being called. This could leak contents of memory as well since the caps_cache allocation is done without zeroing. Signed-off-by: David Riley <davidriley@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20190605234423.11348-1-davidriley@chromium.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* drm/bridge/synopsys: dw-hdmi: Add "unwedge" for ddc busDouglas Anderson2019-06-051-16/+100
| | | | | | | | | | | | | | See the PhD thesis in the comments in this patch for details, but to summarize this adds a hacky "unwedge" feature to the dw_hdmi i2c bus to workaround what appears to be a hardware errata. This relies on a pinctrl entry to help change around muxing to perform the unwedge. NOTE that the specific TV this was tested on was the "Samsung UN40HU6950FXZA" and the specific port was the "STB" port. Signed-off-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190502225336.206885-2-dianders@chromium.org
* dt-bindings: drm/bridge/synopsys: dw-hdmi: Add "unwedge" for ddc busDouglas Anderson2019-06-051-0/+7
| | | | | | | | | | | | | | | | | In certain situations it was seen that we could wedge up the DDC bus on the HDMI adapter on rk3288. The only way to unwedge was to mux one of the pins over to GPIO output-driven-low temporarily and then quickly mux back. Full details can be found in the patch ("drm/bridge/synopsys: dw-hdmi: Add "unwedge" for ddc bus"). Since unwedge requires remuxing the pins, we first need to add to the bindings so that we can specify what state the pins should be in for unwedging. Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190502225336.206885-1-dianders@chromium.org
* drm/r128: drop use of drmP.hSam Ravnborg2019-06-054-6/+30
| | | | | | | | | | | Drop use of the deprecated drmP.h header file. Replace it with relevant include files. Sort include files in files touched. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Link: https://patchwork.freedesktop.org/patch/msgid/20190605141321.17819-3-sam@ravnborg.org
* drm/r128: drop drm_os_linux dependenciesSam Ravnborg2019-06-053-21/+21
| | | | | | | | | | | | | | | | | | Drop use of drm_os_linux macros. Simple 1:1 replacements of - DRM_UDELAY - DRM_CURRENTPID - DRM_READ - DRM_WRITE With this change we do not need to introduce the deprecated drm_os_linux.h header when we drop use of drmP.h. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Link: https://patchwork.freedesktop.org/patch/msgid/20190605141321.17819-2-sam@ravnborg.org
* drm/savage: drop use of drmP.hSam Ravnborg2019-06-054-6/+24
| | | | | | | | | | Drop use of the deprecated drmP.h header file. Replace it with the necessary includes of other headers. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Link: https://patchwork.freedesktop.org/patch/msgid/20190605140313.13629-3-sam@ravnborg.org
* drm/savage: drop use of drm_os_linuxSam Ravnborg2019-06-052-9/+14
| | | | | | | | | | | | | | | | | Drop use of macros from the deprecated drm_os_linux header. Simple 1:1 replacements of - DRM_UDELAY - DRM_CURRENTPID - DRM_READ - DRM_WRITE With this change we do not need to introduce the deprecated drm_os_linux.h header when we drop use of drmP.h. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Link: https://patchwork.freedesktop.org/patch/msgid/20190605140313.13629-2-sam@ravnborg.org
* drm/sis: drop drmP.h useSam Ravnborg2019-06-053-11/+14
| | | | | | | | | | | | | | | Drop use of the deprecated drmP.h header. Repalced with relevant header files and sorted header files in all files touched. Replaced DRM_{READ,WRITE} to avoid the drm_os_linux header. Build tested with allyesconfig, allmodconfig on various architectures. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Link: https://patchwork.freedesktop.org/patch/msgid/20190605135539.12940-2-sam@ravnborg.org
* drm/virtio: use u64_to_user_ptr macroGurchetan Singh2019-06-051-7/+5
| | | | | | | | Other DRM drivers use it too. Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20190604234428.23252-1-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* drm/panel: truly: Add additional delay after pulling down reset gpioVivek Gautam2019-06-051-0/+1
| | | | | | | | | | MTP SDM845 panel seems to need additional delay to bring panel to a workable state. Running modetest without this change displays blurry artifacts. Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190527102616.28315-1-vivek.gautam@codeaurora.org
* dma-buf: Discard old fence_excl on retrying get_fences_rcu for reallocChris Wilson2019-06-051-0/+4
| | | | | | | | | | | | | | | | | If we have to drop the seqcount & rcu lock to perform a krealloc, we have to restart the loop. In doing so, be careful not to lose track of the already acquired exclusive fence. Fixes: fedf54132d24 ("dma-buf: Restart reservation_object_get_fences_rcu() after writes") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: stable@vger.kernel.org #v4.10 Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190604125323.21396-1-chris@chris-wilson.co.uk
* drm/atmel-hlcdc: revert shift by 8Claudiu Beznea2019-06-041-1/+1
| | | | | | | | | | | Revert shift by 8 of state->base.alpha. This introduced a regression on planes. Fixes: 7f73c10b256b ("drm/atmel-hclcdc: Convert to the new generic alpha property") Cc: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/1556195748-11106-7-git-send-email-claudiu.beznea@microchip.com