summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2016-03-16Merge tag 'topic/drm-misc-2016-03-14' of ↵Dave Airlie
git://anongit.freedesktop.org/drm-intel into drm-next * tag 'topic/drm-misc-2016-03-14' of git://anongit.freedesktop.org/drm-intel: (27 commits) drm: atomic helper: do not unreference error pointer drm/edid: Extract SADs properly from multiple audio data blocks drm: fix blob pointer check drm: introduce pipe color correction properties drm/atomic: Clean up update_connector_routing. drm/atomic: Clean up steal_encoder, v2. drm/atomic: Handle encoder assignment conflicts in a separate check, v3. drm/atomic: Handle encoder stealing from set_config better. drm/atomic: Always call steal_encoder, v2. drm/ast: removed optional dummy crtc mode_fixup function. drm/bochs: removed optional dummy crtc mode_fixup function. drm/fsl-dcu: removed optional dummy crtc mode_fixup function. drm/virtio: removed optional dummy crtc mode_fixup function. drm/nouveau/dispnv04: removed optional dummy crtc mode_fixup function. drm/atmel-hlcdc: remove optional dummy crtc mode_fixup function. drm/sti: removed optional dummy crtc mode_fixup function. drm/shmobile: removed optional dummy crtc mode_fixup function. drm/msm/mdp: removed optional dummy crtc mode_fixup function. drm/omapdrm: removed optional dummy crtc mode_fixup function. drm/rcar-du: removed optional dummy crtc mode_fixup function. ...
2016-03-16Merge tag 'drm-amdkfd-next-fixes-2016-03-15' of ↵Dave Airlie
git://people.freedesktop.org/~gabbayo/linux into drm-next * tag 'drm-amdkfd-next-fixes-2016-03-15' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: uninitialized variable in dbgdev_wave_control_set_registers()
2016-03-16drm/omap: fix panel/encoder probesTomi Valkeinen
The recent changes which removed platform data support from panels & encoders had a few mistakes, causing probes of DVI connector and DSI command mode panels to fail every time due to missing '!'. Fix the if()s. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-03-15drm/atmel-hlcdc: use helper to get crtc stateAndrzej Hajda
DRM core provide helper to access crtc state. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1458045988-25246-1-git-send-email-a.hajda@samsung.com
2016-03-15drm/atomic: use helper to get crtc stateAndrzej Hajda
DRM core provide helper to access crtc state. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1458045960-25193-1-git-send-email-a.hajda@samsung.com
2016-03-15drm/amdkfd: uninitialized variable in dbgdev_wave_control_set_registers()Dan Carpenter
At the end of the function we expect "status" to be zero, but it's either -EINVAL or uninitialized. Fixes: 788bf83db301 ('drm/amdkfd: Add wave control operation to debugger') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2016-03-15Merge tag 'drm-vc4-next-2016-03-14' of github.com:anholt/linux into drm-nextDave Airlie
This pull request covers what's left for 4.6. Notably, it includes a significant 3D performance improvement and a fix to HDMI hotplug detection for the Pi2/3. * tag 'drm-vc4-next-2016-03-14' of github.com:anholt/linux: drm/vc4: Recognize a more specific compatible string for V3D. dt-bindings: Add binding docs for V3D. drm/vc4: Return -EFAULT on copy_from_user() failure drm/vc4: Respect GPIO_ACTIVE_LOW on HDMI HPD if set in the devicetree. drm/vc4: Let gpiolib know that we're OK with sleeping for HPD. drm/vc4: improve throughput by pipelining binning and rendering jobs
2016-03-14drm/amdgpu: move fence structure into amdgpu_fence.cChristian König
No need to have that in the header file any more. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-14drm/amdgpu: remove amdgpu_fence_wait_nextChristian König
Not used any more. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-14drm/amdgpu: remove amdgpu_ring_from_fenceChristian König
Not used any more. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-14drm/amdgpu: stop using the ring index in the SAChristian König
The ring index will always collide as hash into the fence list, so use the context number instead. That can still cause collisions, but they are less likely than using ring indices. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-14drm/amdgpu: stop waiting on UVD messages before mapping themChristian König
amdgpu_bo_kmap() now always waits for moves to finish. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-14drm/amdgpu: always wait before kmap a BOChristian König
When a BO is currently moving we otherwise would blindly access the new location without checking. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-14drm/radeon: refactor SI tiling table initializationJosh Poimboeuf
Simplify the control flow of si_tiling_mode_table_init() similar to how it was done in gfx_v7_0.c and gfx_v8_0.c. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-14drm/radeon: refactor CIK tiling table initializationJosh Poimboeuf
Simplify the control flow of cik_tiling_mode_table_init() similar to how it was done in gfx_v7_0.c and gfx_v8_0.c. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-14drm/amdgpu: allow write access to mapped userptrsChristian König
With the updated MMU notifier we should also be able to handle the writeback case correctly. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-14drm/amd/powerplay: use pp_endian.h for TongaAlex Deucher
Drop local versions of these macros. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-14drm/amd/powerplay: use pp_endian.h for FijiAlex Deucher
Drop local versions of these macros. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-14drm/amd/powerplay: add a common pp endian headerAlex Deucher
To replace the duplicated versions of this in all asic variants. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-14drm/amd/powerplay: mv avfs status to smumgr.hrezhu
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-14drm/radeon: rework fbdev handling on chips with no connectorsAlex Deucher
Move all the logic to radeon_fb.c and add checks to functions called frome elsewhere. bug: https://bugzilla.kernel.org/show_bug.cgi?id=112781 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2016-03-14drm/vmwgfx: Allow the UPDATE_LAYOUT ioctl from control nodesThomas Hellstrom
On vmware there is a daemon telling the KMS system about the GUI layout. Typically it talks to the X server but in the absence of an X server or if there are multiple, it wants to talk directly to the vmwgfx kernel module. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2016-03-14drm/vmwgfx: Send a hotplug event at master_setThomas Hellstrom
Make sure drm clients (mostly the X server) are communicated the current layout when switched in. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2016-03-14drm/vmwgfx: Default to explicit crtc placement for screen targets and screen ↵Thomas Hellstrom
objects Enables using multiple framebuffers. For legacy display units, explicit crtc placement is not supported due to hardware limitations. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2016-03-14drm/vmwgfx: Calculate the cursor position based on the crtc gui originThomas Hellstrom
Base the cursor position on the coordinate of the crtc origin in the gui coordinate system rather than in the framebuffer coordinate system. With explicit placement, these may differ (for example when two crtcs scan out of the same framebuffer location). Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2016-03-14drm/vmwgfx: Add connector properties to switch between explicit and implicit ↵Thomas Hellstrom
placement Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2016-03-14drm/vmwgfx: Add suggested screen x and y connector propertiesThomas Hellstrom
Introduced by qxl, add these properties as a generic way to tell a display manager about the GUI layout. Also add the hotplug_mode_update_property which advises display managers to reread the mode list on a hotplug event. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2016-03-14drm/vmwgfx: Add implicit framebuffer checks to the screen target codeThomas Hellstrom
Just like for screen objects, make sure we use only a single framebuffer for implicit placement. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2016-03-14drm/vmwgfx: Break out implicit fb codeThomas Hellstrom
Preparation for supporting explicit fbs for screen objects and screen targets. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2016-03-14drm/vmwgfx: Rework screen target page flips v2Thomas Hellstrom
Gnome-Shell / Wayland assumes that page-flips can be done on a crtc regardless of framebuffer size and the crtc position within the framebuffer. Therefore rework the screen target code to correctly handle changes in framebuffer size and content_fb_type. Also make sure that we update the screen target correctly when the content_fb_type is not SAME_AS_DISPLAY. This commit breaks out the framebuffer binding code from crtc_set so it can be used both from page_flip() and crtc_set() and reworks those functions a bit to be more robust. v2: Address review comments by Sinclair Yeh. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2016-03-14drm/vmwgfx: Fix screen object page flips for large framebuffersThomas Hellstrom
For page flips the framebuffer may be much larger than the crtc scanout area and may be attached to multiple crtcs. When flipping a crtc, make sure we dirty only that crtc's area of the framebuffer. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2016-03-14drm/vmwgfx: Fix a screen object framebuffer dirty corner caseThomas Hellstrom
If there are no cliprects for a particular crtc, an invalid command would have been generated. If that's the case, instead ditch the generated command sequence. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2016-03-14drm/vmwgfx: Add DXGenMips supportCharmaine Lee
Add support for DXGenMips command. Signed-off-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
2016-03-14drm/i915: Handle -EDEADLK in drm_atomic_commit from load-detect.Maarten Lankhorst
CI runs with DEBUG_WW_MUTEX_SLOWPATH, so -EDEADLK occurs a lot more. Handle the case where drm_atomic_commit fails with -EDEADLK correctly. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/56D3FEF1.6070306@linux.intel.com Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (cherry picked from commit 3ba86073edcbe2be53d9862d5a3098f0ebf8ae9a) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-03-13drm/vc4: Recognize a more specific compatible string for V3D.Eric Anholt
The Raspberry Pi Foundation's firmware updates are shipping device trees using the old string, so we'll keep recognizing that as this rev of V3D. Still, we should use a more specific name in the upstream DT to clarify which board is being supported, in case we do other revs of V3D in the future. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
2016-03-14drm/nouveau/clk/gm20b: add basic driverAlexandre Courbot
Add a basic clock driver that reuses the GK20A logic. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/clk/gk20a: share reusable structures/functionsAlexandre Courbot
Make functions/structures that the GM20B driver will reuse public. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/clk/gk20a: set lowest frequency during init()Alexandre Courbot
Err on the safe side by setting the lowest frequency (and thus voltage) during device init. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/clk/gk20a: split gk20a_clk_new()Alexandre Courbot
This allows to instanciate drivers that use the same logic as gk20a with different parameters. Add a constructor function to allow other chips that inherit from this clock to easily initialize its members Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/clk/gk20a: abstract pl_to_divAlexandre Courbot
pl_to_div may be done differently depending on the chip. Abstract this operation so the same logic can be reused for them as well. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/clk/gk20a: put mnp values into their own structAlexandre Courbot
This allows us to read them using one single function and will be handy to the GM20B driver. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/clk/gk20a: emit parent rate as debug messageAlexandre Courbot
Most users are probably not interested in this information. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/clk/gk20a: only restore divider to 1:1 if neededAlexandre Courbot
Only restore the 1:1 divider if it is not set already. Also use the proper masks for this operation and add a second write as done in the Android code. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/clk/gk20a: only compute n_lo if neededAlexandre Courbot
n_lo is used if we are going to slide. Compute it only if that condition succeeds to avoid confusion about future usage of this computation. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/clk/gk20a: fix VCO bit maskAlexandre Courbot
Fix the mask specified to switch to VCO mode was given as an (incorrect) immediate value. Although the side-effect happens to be the same, this is clearly incorrect. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/clk/gk20a: rename enable/disable functionsAlexandre Courbot
gk20a_pllg_disable() is only used in the context of gk20a_clk_fini(). Move its body there and rename _gk20a_pllg_enable() and _gk20a_pllg_disable() to non-underscored versions. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/clk/gk20a: reorganize variables in gk20a_pllg_calc_mnp()Alexandre Courbot
Move some variables declarations to the scope where they are actually used to make the code easier to follow. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/clk/gk20a: convert parameters to KhzAlexandre Courbot
Perform computations in Khz instead of Mhz for better precision. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/volt: add GM20B driverAlexandre Courbot
Add basic GM20B volt driver that reuses the GK20A logic. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14drm/nouveau/volt/gk20a: split constructorAlexandre Courbot
Split the constructor function so we can reuse the same logic in other chips. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>