Age | Commit message (Collapse) | Author | Files | Lines |
|
We want this for consistency with existing page_flip semantics.
Since this spurred quite a discussion on IRC also document why we
reject event generation when the pipe is off: It's not that it's hard
to implement, but userspace has a track recording which proves that it's
way too easy to accidentally abuse and cause havoc. We want to make
sure userspace doesn't get away with that.
v2: Somehow thought we do reject events already, but that code only
existed in my imagination ... Also suggestions from Thierry.
Cc: Daniel Stone <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Cc: Thierry Reding <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
It can be useful to iterate over connectors without grabbing
connection_mutex. It can also be used to see how many connectors
are on a crtc without iterating over the list.
Signed-off-by: Maarten Lankhorst <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/1451908400-25147-4-git-send-email-maarten.lankhorst@linux.intel.com
Signed-off-by: Daniel Vetter <[email protected]>
|
|
state, v2.
Changes since v1:
- Do not reset if state allocation fails.
Signed-off-by: Maarten Lankhorst <[email protected]>
Acked-by: Thierry Reding <[email protected]> #irc
Link: http://patchwork.freedesktop.org/patch/msgid/1451908400-25147-3-git-send-email-maarten.lankhorst@linux.intel.com
Signed-off-by: Daniel Vetter <[email protected]>
|
|
This is useful for drivers that subclass connector_state, like tegra.
Changes since v1:
- Docbook updates.
Signed-off-by: Maarten Lankhorst <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/1451908400-25147-2-git-send-email-maarten.lankhorst@linux.intel.com
Signed-off-by: Daniel Vetter <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Signed-off-by: Tom St Denis <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
|
|
Fold two cases into one for a LOC reduction.
Signed-off-by: Tom St Denis <[email protected]>
Reviewed-by: Christian König <[email protected]>
|
|
LOC reduction and simplification.
Signed-off-by: Tom St Denis <[email protected]>
Reviewed-by: Christian König <[email protected]>
|
|
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]>
|
|
Basic LOC reduction.
Signed-off-by: Tom St Denis <[email protected]>
Reviewed-by: Christian König <[email protected]>
|
|
vm_manager_fini shouldn't be in suspend phase.
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Ken Wang <[email protected]>
|
|
fdo#93557
Signed-off-by: Ben Skeggs <[email protected]>
Cc: [email protected]
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]
|
|
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]
|
|
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]
|
|
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]
|
|
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]>
|
|
|
|
Fix indentation of vga_switcheroo sections in gpu.tmpl.
Change section type of API documentation from "chapter" to "sect1"
so that the individual functions no longer clutter up the ToC.
Group together under a new "API" chapter.
Fix wording "heretoforth" -> "henceforth".
Signed-off-by: Lukas Wunner <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
|
|
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]>
|
|
Use to_pci_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
|
|
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()
|
|
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]>
|
|
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]>
|
|
Remove unused defines related to SGX plugin which are not used.
Signed-off-by: Tomi Valkeinen <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Reorder functions to get rid of forward declarations
Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Move omap_plane_reset() function to avoid forward declarations in the
next patch.
Signed-off-by: Tomi Valkeinen <[email protected]>
|
|
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]>
|