aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
AgeCommit message (Collapse)AuthorFilesLines
2016-01-05drm/i915: Set connector_state->connector using the helper.Maarten Lankhorst1-4/+2
The atomic helper sets connector_state->connector, which the i915 code didn't. This will become a problem when we start using it. Signed-off-by: Maarten Lankhorst <[email protected]> Acked-by: Thierry Reding <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1451908400-25147-1-git-send-email-maarten.lankhorst@linux.intel.com Signed-off-by: Daniel Vetter <[email protected]>
2016-01-05drm: Use a normal idr allocation for the obj->nameChris Wilson1-3/+1
Unlike the handle, the name table uses a sleeping mutex rather than a spinlock. The allocation is in a normal context, and we can use the simpler sleeping gfp_t, rather than have to take from the atomic reserves. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Daniel Vetter <[email protected]>
2016-01-05drm: Only bump object-reference count when adding first handleChris Wilson1-5/+12
We only need a single reference count for all handles (i.e. non-zero obj->handle_count) and so can trim a few atomic operations by only taking the reference on the first handle and dropping it after the last. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Daniel Vetter <[email protected]>
2016-01-05drm: Balance error path for GEM handle allocationChris Wilson1-12/+17
The current error path for failure when establishing a handle for a GEM object is unbalance, e.g. we call object_close() without calling first object_open(). Use the typical onion structure to only undo what has been set up prior to the error. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2016-01-04amdgpu/dce11: Add test for crtc < 0 to various DCEv11 functionsTom St Denis1-4/+4
To be consistent with other DCE11 functions test for crtc < 0. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-01-04amdgpu/dce11: Remove division from dce_v11_0_vblank_wait()Tom St Denis1-3/+5
Mimics odd behaviour where (i++ % 100 == 0) is true in the first iteration of each loop... Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-01-04amdgpu/vce3: Simplify vce_v3_0_hw_init and ensure both rings default to not ↵Tom St Denis1-15/+9
ready. Simplified the ring test and added logic to ensure rings are marked not ready by default. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2016-01-04amdgpu/vce3: Remove magic constants from harvest register masks.Tom St Denis1-4/+4
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-01-04amdgpu/vce3: Simplify vce_v3_0_process_interrupt()Tom St Denis1-3/+1
Fold two cases into one for a LOC reduction. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]>
2016-01-04amdgpu/vce3: Simplify vce_v3_0_soft_reset()Tom St Denis1-9/+2
LOC reduction and simplification. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]>
2016-01-04amdgpu/vce3: Simplify idle and wait for idle codeTom St Denis1-25/+5
More LOC reductions in VCE3 code. This patch simplifies the is_idle and wait_for_idle logic. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]>
2016-01-04amdgpu/vce3: Cleanup harvest config function.Tom St Denis1-14/+6
Basic LOC reduction. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]>
2016-01-04drm/amdgpu: fix NULL in vm_grab_id while S3 backChunming Zhou2-2/+0
vm_manager_fini shouldn't be in suspend phase. Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Ken Wang <[email protected]>
2016-01-05drm/nouveau/gr/nv40: fix oops in interrupt handlerBen Skeggs1-0/+1
fdo#93557 Signed-off-by: Ben Skeggs <[email protected]> Cc: [email protected]
2016-01-04drm/amd/powerplay: precedence bug in init_non_clock_fields()Dan Carpenter1-2/+2
The cast to uint8_t happens before the right shift so this always sets .m3arb to zero. The cast is actually a no-op so we can remove it. Fixes: 3bace3591493 ('drm/amd/powerplay: add hardware manager sub-component') Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-01-04drm/amdgpu/cgs: cleanup some indentingDan Carpenter1-9/+9
This code is indented too far. Also we normally use spaces to align if statement conditions. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-01-04drm/amd/powerplay: fix a reversed conditionDan Carpenter1-1/+1
This test was reversed so it would end up leading to a NULL dereference. Fixes: 4630f0faae80 ('drm/amd/powerplay: add Carrizo smu support') Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-01-04drm/radeon: Drop unnecessary unsigned int < 0 checkThierry Reding1-1/+1
Unsigned integers can never be negative, so drop this check. Cc: Christian König <[email protected]> Cc: Alex Deucher <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-01-04drm/dp/mst: fix in RAD element accessMykola Lysenko1-2/+2
This is needed to receive correct port number from RAD, so MSTB could be found Acked-by: Dave Airlie <[email protected]> Signed-off-by: Mykola Lysenko <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-01-04drm/dp/mst: fix in MSTB RAD initializationMykola Lysenko1-6/+6
This fix is needed to support more then two branch displays, so RAD address consist at least of 2 elements Acked-by: Dave Airlie <[email protected]> Signed-off-by: Mykola Lysenko <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-01-04drm/dp/mst: always send reply for UP requestMykola Lysenko1-19/+11
We should always send reply for UP request in order to make downstream device clean-up resources appropriately. Issue was that reply for UP request was sent only once. Acked-by: Dave Airlie <[email protected]> Signed-off-by: Mykola Lysenko <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-01-04drm/dp/mst: process broadcast messages correctlyMykola Lysenko1-11/+84
In case broadcast message received in UP request, RAD cannot be used to identify message originator. Message should be parsed, originator should be found by GUID from parsed message. Also reply with broadcast in case broadcast message received (for now it is always broadcast) Acked-by: Dave Airlie <[email protected]> Signed-off-by: Mykola Lysenko <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-01-04drm: powerplay: use div64_s64 instead of do_divArnd Bergmann1-1/+1
The newly added code for Fiji creates a correct compiler warning about invalid use of the do_div macro: In file included from powerplay/hwmgr/ppatomctrl.c:31:0: drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppevvmath.h: In function 'fDivide': drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppevvmath.h:382:89: warning: comparison of distinct pointer types lacks a cast do_div(longlongX, longlongY); /*Q(32,32) divided by Q(16,16) = Q(16,16) Back to original format */ do_div() divides an unsigned 64-bit number by an unsigned 32-bit number. The code instead wants to divide two signed 64-bit numbers, which is done using the div64_s64 function. Reviewed-by: Thierry Reding <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Fixes: 770911a3cfbb ("drm/amd/powerplay: add/update headers for Fiji SMU and DPM") Signed-off-by: Alex Deucher <[email protected]>
2016-01-04drm/dp/mst: constify drm_dp_mst_topology_cbs structuresJulia Lawall2-2/+2
The drm_dp_mst_topology_cbs structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2016-01-04drm/gma500: use to_pci_dev()Geliang Tang1-2/+2
Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2016-01-03Merge tag 'drm-intel-fixes-2016-01-02' of ↵Linus Torvalds2-5/+9
git://anongit.freedesktop.org/drm-intel Pull i915 drm fixes from Jani Nikula: "Two display fixes still for v4.4. The new year's resolution is to start using signed tags per Linus' request. This one is still unsigned; I want to fix this up in our maintainer scripts instead of doing it one-off" * tag 'drm-intel-fixes-2016-01-02' of git://anongit.freedesktop.org/drm-intel: drm/i915: increase the tries for HDMI hotplug live status checking drm/i915: Unbreak check_digital_port_conflicts()
2015-12-31drm/omap: remove obsolete manager assignmentTomi Valkeinen1-2/+0
omap_encoder_update() assigns an overlay manager to dssdev->src->manager. This assignment is not needed, as the connections in the display chain have already been made at connect step. Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm/omap: set DRIVER_ATOMIC for omapdrmTomi Valkeinen1-1/+2
omapdrm supports atomic modesetting, and it seems to work ok. So let's set the flag to enable the atomic modesetting API support. Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Laurent Pinchart <[email protected]>
2015-12-31drm/omap: remove unused plugin definesTomi Valkeinen1-6/+0
Remove unused defines related to SGX plugin which are not used. Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Laurent Pinchart <[email protected]>
2015-12-31drm/omap: Use bitmaps for TILER placementAndy Gross3-637/+204
Modified Tiler placement to utilize bitmaps for bookkeeping and all placement algorithms. This resulted in a substantial savings in time for all Tiler reservation and free operations. Typical savings are in the range of 28% decrease in time taken with larger buffers showing a 80%+ decrease. Signed-off-by: Andy Gross <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: gem: Remove check for impossible conditionLaurent Pinchart1-3/+0
The GEM object can't be tiled without a usergart as that condition is checked and considered as an error when creating the GEM object. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: gem: Simplify error handling when creating GEM objectLaurent Pinchart1-5/+3
The goto error statement end up just returning NULL without performing any cleanup, replace it with a direct return. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: gem: Don't free mmap offset twiceLaurent Pinchart1-2/+0
The drm_gem_free_mmap_offset() call in omap_gem_free_object() is redundant as the same function is called from drm_gem_object_release(). Remove it. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: gem: Fix GEM object destroy in error pathLaurent Pinchart1-2/+1
Use the omap_gem_free_object() function to destroy the GEM object in the omap_gem_new_handle() error path instead of doing it manually (and incorrectly). Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: gem: Free the correct memory objectLaurent Pinchart1-1/+1
The GEM object free handler frees memory allocated by the driver using the pointer to the drm_gem_object instead of the pointer to the omap_gem_object that embeds it. This doesn't cause any issue in practice as the drm_gem_object is the first field of omap_gem_object, but would cause memory corruption if the structure layout changes. Fix it. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: gem: Mask out private flags passed from userspaceLaurent Pinchart1-3/+8
The 8 high order bits of the buffer flags are reserved for internal use. Mask them out from the flags passed by userspace. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: gem: Move global usergart variable to omap_drm_privateLaurent Pinchart2-21/+36
The structure contains data related to a device instance, it shouldn't be a global variable. While at it rename the usergart structures with an omap_drm_ prefix. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: gem: Group functions by purposeLaurent Pinchart1-53/+87
Divide the GEM implementation in groups of functions to improve readability. No code change is performed by this commit. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: gem: Remove forward declarationsLaurent Pinchart1-44/+46
Reorder functions to get rid of forward declarations Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: gem: Remove unused function prototypesLaurent Pinchart1-6/+0
Several DRM core function prototypes refer to functions that don't exist anymore and are thus obviously never called. Remove them. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: Make fbdev emulation optionalLaurent Pinchart6-5/+24
Don't compile the fbdev emulation code when fbdev emulation support is disabled. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: Fix plane state free in plane reset handlerLaurent Pinchart1-5/+4
The plane reset handler frees the plane state and allocates a new default state, but when doing so attempt to free the plane state using the base plane state pointer instead of casting it to the driver-specific state object that has been allocated. Fix it by using the omap_plane_atomic_destroy_state() function to destroy the plane state instead of duplicating the code. Signed-off-by: Laurent Pinchart <[email protected]> [[email protected]: move of the func into separate patch] Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: move omap_plane_reset()Tomi Valkeinen1-27/+27
Move omap_plane_reset() function to avoid forward declarations in the next patch. Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm/omap: Use platform_register/unregister_drivers()Thierry Reding1-19/+7
These new helpers simplify implementing multi-driver modules and properly handle failure to register one driver by unregistering all previously registered drivers. Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm: omapdrm: tiler: Remove unneded module alias for tilerLuis de Bethencourt1-1/+0
omap_dmm_tiler.c can't be compiled as a module and it is built unconditionally as part of omapdrm. Since it can't be used as a module, there is no need for it to have an unused MODULE_ALIAS(). Signed-off-by: Luis de Bethencourt <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2015-12-31drm/rockchip: vop: export vop_component_ops to modulesStephen Rothwell1-0/+1
Fixes: a67719d18229 ("drm/rockchip: vop: spilt register related into rockchip_reg_vop.c") Signed-off-by: Stephen Rothwell <[email protected]> Acked-by: Mark Yao <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2015-12-30drm/i915: increase the tries for HDMI hotplug live status checkingGary Wang1-1/+1
The total delay of HDMI hotplug detecting with 30ms is sometimes not enoughtfor HDMI live status up with specific HDMI monitors in BSW platform. After doing experiments for following monitors, it needs 80ms at least for those worst cases. Lenovo L246 1xwA (4 failed, necessary hot-plug delay: 58/40/60/40ms) Philips HH2AP (9 failed, necessary hot-plug delay: 80/50/50/60/46/40/58/58/39ms) BENQ ET-0035-N (6 failed, necessary hot-plug delay: 60/50/50/80/80/40ms) DELL U2713HM (2 failed, necessary hot-plug delay: 58/59ms) HP HP-LP2475w (5 failed, necessary hot-plug delay: 70/50/40/60/40ms) It looks like 70-80 ms is BSW platform needs in some bad cases of the monitors at this end (8 times delay at most). Keep less than 100ms for HDCP pulse HPD low (with at least 100ms) to respond a plug out. Reviewed-by: Cooper Chiou <[email protected]> Tested-by: Gary Wang <[email protected]> Cc: Gavin Hindman <[email protected]> Cc: Sonika Jindal <[email protected]> Cc: Shashank Sharma <[email protected]> Cc: Shobhit Kumar <[email protected]> Signed-off-by: Gary Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Tested-by: Shobhit Kumar <[email protected]> Cc: [email protected] Fixes: 237ed86c693d ("drm/i915: Check live status before reading edid") Signed-off-by: Daniel Vetter <[email protected]> (cherry picked from commit f8d03ea0053b23de42c828d559016eabe0b91523) [Jani: undo the file mode change of the original commit] Signed-off-by: Jani Nikula <[email protected]>
2015-12-29drm/omap: make omapdrm select OMAP2_DSSTomi Valkeinen2-4/+6
Now that omapdss is only for omapdrm, we can change omapdrm to select OMAP2_DSS to enable omapdss if omapdrm is enabled, instead of omapdrm depending on omapdss. We can also change omapdss and the display drivers to depend on DRM_OMAP, so that they are only visible under omapdrm in menuconfig. Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: Rob Clark <[email protected]>
2015-12-29drm/omap: move omapdss & displays under omapdrmTomi Valkeinen59-2/+36333
Now that omapfb has its own copy of omapdss and display drivers, we can move omapdss and display drivers which omapdrm uses to omapdrm's directory. We also need to change the main drm Makefile so that omapdrm directory is always entered, because omapdss has a file that can't be built as a module. Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: Rob Clark <[email protected]>
2015-12-28drm/rockchip: vop: add rk3036 vop supportMark Yao2-203/+336
RK3036 registers layout is quite difference with rk3288 layout, The IC design with different framework, rk3036 vop is VOP LITE, and rk3288 is VOP FULL. RK3036 support two overlay plane and one hwc plane, max output resolution is 1080p. it support IOMMU, and its IOMMU same as rk3288's. Signed-off-by: Mark Yao <[email protected]>