mirror of
https://github.com/a52xq-dev/kernel.git
synced 2026-10-18 21:58:11 +07:00
Merge tag 'drm-misc-next-2017-07-26' of git://anongit.freedesktop.org/git/drm-misc into drm-next
drm-misc-next-2017-07-18: Core Changes: - A couple fixes to only opening crc when needed (Maarten) - Change atomic helper swap_state to be interruptible (Maarten) - fb_helper: Support waiting for an output before setting up (Daniel) - Allow drivers supporting runtime_pm to use helper_commit_tail (Maxime) Driver Changes: - misc: Use %pOF to print device node names (Rob) - Miscellaneous fixes drm-misc-next-2017-07-18: UAPI Changes: - Fail commits which request an event without including a crtc (Andrey) Core Changes: - Add YCBCR 4:2:0 support (Shashank) - s/drm_atomic_replace_property_blob/drm_property_replace_blob/ (Peter) - Add proper base class for private objs instead of using void* (Ville) - Remove pending_read/write_domains from drm_gem_object (Chris) - Add async plane update support (ie: cursor) to atomic helpers (Gustavo) - Add old state to .enable and rename to .atomic_enable (Laurent) - Add drm_atomic_helper_wait_for_flip_done() (Boris) - Remove drm_driver->set_busid hook (Daniel) - Migrate vblank documentation into the source files (Daniel) - Add fb_helper->lock instead of abusing modeset lock (Thierry/Daniel) Driver Changes: - stm: Add STM32 DSI controller driver (Phillipe) - amdgpu: Numerous small/misc fixes - bridge: Add Synopsys Designware MIPI DSI host bridge driver (Phillipe) - tinydrm: Add support for Pervasive Displays RePaper displays (Noralf) - misc: Replace for_each_[obj]_in_state to prep for removal (Maarten) - misc: Use .atomic_disable for atomic drivers (Laurent) - vgem: Pin pages when mapped/exported (Chris) - dw_hdmi: Add support for Rockchip RK3399 (Mark) - atmel-hlcdc: Add 8-bit color look-up table format (Peter) - vc4: Send vblank event when disabling a crtc (Boris) - vc4: Use atomic helpers for fence waits (Eric) - misc: drop drm_vblank_cleanup cargo-cult (Daniel) Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Eric Anholt <eric@anholt.net> Cc: Peter Rosin <peda@axentia.se> Cc: Mark Yao <mark.yao@rock-chips.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Cc: Gustavo Padovan <gustavo.padovan@collabora.com> Cc: Thierry Reding <treding@nvidia.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Peter Rosin <peda@axentia.se> Cc: Shashank Sharma <shashank.sharma@intel.com> Cc: Philippe CORNU <philippe.cornu@st.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Rob Herring <robh@kernel.org> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> * tag 'drm-misc-next-2017-07-26' of git://anongit.freedesktop.org/git/drm-misc: (171 commits) drm/hisilicon: fix build error without fbdev emulation drm/atomic: implement drm_atomic_helper_commit_tail for runtime_pm users drm: Improve kerneldoc for drm_modeset_lock drm/hisilicon: Remove custom FB helper deferred setup drm/exynos: Remove custom FB helper deferred setup drm/fb-helper: Support deferred setup dma-fence: Don't BUG_ON when not absolutely needed drm: Convert to using %pOF instead of full_name drm/syncobj: Fix kerneldoc drm/atomic: Allow drm_atomic_helper_swap_state to fail drm/atomic: Add __must_check to drm_atomic_helper_swap_state. drm/vc4: Handle drm_atomic_helper_swap_state failure drm/tilcdc: Handle drm_atomic_helper_swap_state failure drm/tegra: Handle drm_atomic_helper_swap_state failure drm/msm: Handle drm_atomic_helper_swap_state failure drm/mediatek: Handle drm_atomic_helper_swap_state failure drm/i915: Handle drm_atomic_helper_swap_state failure drm/atmel-hlcdc: Handle drm_atomic_helper_swap_state failure drm/nouveau: Handle drm_atomic_helper_swap_state failure drm/atomic: Change drm_atomic_helper_swap_state to return an error. ...
This commit is contained in:
commit
542aefb5a2
228 changed files with 5152 additions and 1811 deletions
|
|
@ -0,0 +1,32 @@
|
|||
Synopsys DesignWare MIPI DSI host controller
|
||||
============================================
|
||||
|
||||
This document defines device tree properties for the Synopsys DesignWare MIPI
|
||||
DSI host controller. It doesn't constitue a device tree binding specification
|
||||
by itself but is meant to be referenced by platform-specific device tree
|
||||
bindings.
|
||||
|
||||
When referenced from platform device tree bindings the properties defined in
|
||||
this document are defined as follows. The platform device tree bindings are
|
||||
responsible for defining whether each optional property is used or not.
|
||||
|
||||
- reg: Memory mapped base address and length of the DesignWare MIPI DSI
|
||||
host controller registers. (mandatory)
|
||||
|
||||
- clocks: References to all the clocks specified in the clock-names property
|
||||
as specified in [1]. (mandatory)
|
||||
|
||||
- clock-names:
|
||||
- "pclk" is the peripheral clock for either AHB and APB. (mandatory)
|
||||
- "px_clk" is the pixel clock for the DPI/RGB input. (optional)
|
||||
|
||||
- resets: References to all the resets specified in the reset-names property
|
||||
as specified in [2]. (optional)
|
||||
|
||||
- reset-names: string reset name, must be "apb" if used. (optional)
|
||||
|
||||
- panel or bridge node: see [3]. (mandatory)
|
||||
|
||||
[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
|
||||
[2] Documentation/devicetree/bindings/reset/reset.txt
|
||||
[3] Documentation/devicetree/bindings/display/mipi-dsi-bus.txt
|
||||
52
Documentation/devicetree/bindings/display/repaper.txt
Normal file
52
Documentation/devicetree/bindings/display/repaper.txt
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
Pervasive Displays RePaper branded e-ink displays
|
||||
|
||||
Required properties:
|
||||
- compatible: "pervasive,e1144cs021" for 1.44" display
|
||||
"pervasive,e1190cs021" for 1.9" display
|
||||
"pervasive,e2200cs021" for 2.0" display
|
||||
"pervasive,e2271cs021" for 2.7" display
|
||||
|
||||
- panel-on-gpios: Timing controller power control
|
||||
- discharge-gpios: Discharge control
|
||||
- reset-gpios: RESET pin
|
||||
- busy-gpios: BUSY pin
|
||||
|
||||
Required property for e2271cs021:
|
||||
- border-gpios: Border control
|
||||
|
||||
The node for this driver must be a child node of a SPI controller, hence
|
||||
all mandatory properties described in ../spi/spi-bus.txt must be specified.
|
||||
|
||||
Optional property:
|
||||
- pervasive,thermal-zone: name of thermometer's thermal zone
|
||||
|
||||
Example:
|
||||
|
||||
display_temp: lm75@48 {
|
||||
compatible = "lm75b";
|
||||
reg = <0x48>;
|
||||
#thermal-sensor-cells = <0>;
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
display {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
thermal-sensors = <&display_temp>;
|
||||
};
|
||||
};
|
||||
|
||||
papirus27@0{
|
||||
compatible = "pervasive,e2271cs021";
|
||||
reg = <0>;
|
||||
|
||||
spi-max-frequency = <8000000>;
|
||||
|
||||
panel-on-gpios = <&gpio 23 0>;
|
||||
border-gpios = <&gpio 14 0>;
|
||||
discharge-gpios = <&gpio 15 0>;
|
||||
reset-gpios = <&gpio 24 0>;
|
||||
busy-gpios = <&gpio 25 0>;
|
||||
|
||||
pervasive,thermal-zone = "display";
|
||||
};
|
||||
|
|
@ -11,7 +11,9 @@ following device-specific properties.
|
|||
|
||||
Required properties:
|
||||
|
||||
- compatible: Shall contain "rockchip,rk3288-dw-hdmi".
|
||||
- compatible: should be one of the following:
|
||||
"rockchip,rk3288-dw-hdmi"
|
||||
"rockchip,rk3399-dw-hdmi"
|
||||
- reg: See dw_hdmi.txt.
|
||||
- reg-io-width: See dw_hdmi.txt. Shall be 4.
|
||||
- interrupts: HDMI interrupt number
|
||||
|
|
@ -30,7 +32,8 @@ Optional properties
|
|||
I2C master controller.
|
||||
- clock-names: See dw_hdmi.txt. The "cec" clock is optional.
|
||||
- clock-names: May contain "cec" as defined in dw_hdmi.txt.
|
||||
|
||||
- clock-names: May contain "grf", power for grf io.
|
||||
- clock-names: May contain "vpll", external clock for some hdmi phy.
|
||||
|
||||
Example:
|
||||
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ oxsemi Oxford Semiconductor, Ltd.
|
|||
panasonic Panasonic Corporation
|
||||
parade Parade Technologies Inc.
|
||||
pericom Pericom Technology Inc.
|
||||
pervasive Pervasive Displays, Inc.
|
||||
phytec PHYTEC Messtechnik GmbH
|
||||
picochip Picochip Ltd
|
||||
pine64 Pine64
|
||||
|
|
|
|||
|
|
@ -201,6 +201,8 @@ drivers.
|
|||
Open/Close, File Operations and IOCTLs
|
||||
======================================
|
||||
|
||||
.. _drm_driver_fops:
|
||||
|
||||
File Operations
|
||||
---------------
|
||||
|
||||
|
|
|
|||
|
|
@ -523,9 +523,6 @@ Color Management Properties
|
|||
.. kernel-doc:: drivers/gpu/drm/drm_color_mgmt.c
|
||||
:doc: overview
|
||||
|
||||
.. kernel-doc:: include/drm/drm_color_mgmt.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: drivers/gpu/drm/drm_color_mgmt.c
|
||||
:export:
|
||||
|
||||
|
|
@ -554,60 +551,8 @@ various modules/drivers.
|
|||
Vertical Blanking
|
||||
=================
|
||||
|
||||
Vertical blanking plays a major role in graphics rendering. To achieve
|
||||
tear-free display, users must synchronize page flips and/or rendering to
|
||||
vertical blanking. The DRM API offers ioctls to perform page flips
|
||||
synchronized to vertical blanking and wait for vertical blanking.
|
||||
|
||||
The DRM core handles most of the vertical blanking management logic,
|
||||
which involves filtering out spurious interrupts, keeping race-free
|
||||
blanking counters, coping with counter wrap-around and resets and
|
||||
keeping use counts. It relies on the driver to generate vertical
|
||||
blanking interrupts and optionally provide a hardware vertical blanking
|
||||
counter. Drivers must implement the following operations.
|
||||
|
||||
- int (\*enable_vblank) (struct drm_device \*dev, int crtc); void
|
||||
(\*disable_vblank) (struct drm_device \*dev, int crtc);
|
||||
Enable or disable vertical blanking interrupts for the given CRTC.
|
||||
|
||||
- u32 (\*get_vblank_counter) (struct drm_device \*dev, int crtc);
|
||||
Retrieve the value of the vertical blanking counter for the given
|
||||
CRTC. If the hardware maintains a vertical blanking counter its value
|
||||
should be returned. Otherwise drivers can use the
|
||||
:c:func:`drm_vblank_count()` helper function to handle this
|
||||
operation.
|
||||
|
||||
Drivers must initialize the vertical blanking handling core with a call
|
||||
to :c:func:`drm_vblank_init()` in their load operation.
|
||||
|
||||
Vertical blanking interrupts can be enabled by the DRM core or by
|
||||
drivers themselves (for instance to handle page flipping operations).
|
||||
The DRM core maintains a vertical blanking use count to ensure that the
|
||||
interrupts are not disabled while a user still needs them. To increment
|
||||
the use count, drivers call :c:func:`drm_vblank_get()`. Upon
|
||||
return vertical blanking interrupts are guaranteed to be enabled.
|
||||
|
||||
To decrement the use count drivers call
|
||||
:c:func:`drm_vblank_put()`. Only when the use count drops to zero
|
||||
will the DRM core disable the vertical blanking interrupts after a delay
|
||||
by scheduling a timer. The delay is accessible through the
|
||||
vblankoffdelay module parameter or the ``drm_vblank_offdelay`` global
|
||||
variable and expressed in milliseconds. Its default value is 5000 ms.
|
||||
Zero means never disable, and a negative value means disable
|
||||
immediately. Drivers may override the behaviour by setting the
|
||||
:c:type:`struct drm_device <drm_device>`
|
||||
vblank_disable_immediate flag, which when set causes vblank interrupts
|
||||
to be disabled immediately regardless of the drm_vblank_offdelay
|
||||
value. The flag should only be set if there's a properly working
|
||||
hardware vblank counter present.
|
||||
|
||||
When a vertical blanking interrupt occurs drivers only need to call the
|
||||
:c:func:`drm_handle_vblank()` function to account for the
|
||||
interrupt.
|
||||
|
||||
Resources allocated by :c:func:`drm_vblank_init()` must be freed
|
||||
with a call to :c:func:`drm_vblank_cleanup()` in the driver unload
|
||||
operation handler.
|
||||
.. kernel-doc:: drivers/gpu/drm/drm_vblank.c
|
||||
:doc: vblank handling
|
||||
|
||||
Vertical Blanking and Interrupt Handling Functions Reference
|
||||
------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ acquired and release by :c:func:`calling drm_gem_object_get()` and
|
|||
holding the lock.
|
||||
|
||||
When the last reference to a GEM object is released the GEM core calls
|
||||
the :c:type:`struct drm_driver <drm_driver>` gem_free_object
|
||||
the :c:type:`struct drm_driver <drm_driver>` gem_free_object_unlocked
|
||||
operation. That operation is mandatory for GEM-enabled drivers and must
|
||||
free the GEM object and all associated resources.
|
||||
|
||||
|
|
@ -492,7 +492,7 @@ DRM Sync Objects
|
|||
:doc: Overview
|
||||
|
||||
.. kernel-doc:: include/drm/drm_syncobj.h
|
||||
:export:
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: drivers/gpu/drm/drm_syncobj.c
|
||||
:export:
|
||||
|
|
|
|||
|
|
@ -160,6 +160,8 @@ other hand, a driver requires shared state between clients which is
|
|||
visible to user-space and accessible beyond open-file boundaries, they
|
||||
cannot support render nodes.
|
||||
|
||||
.. _drm_driver_ioctl:
|
||||
|
||||
IOCTL Support on Device Nodes
|
||||
=============================
|
||||
|
||||
|
|
|
|||
|
|
@ -4541,6 +4541,12 @@ M: Dave Airlie <airlied@redhat.com>
|
|||
S: Odd Fixes
|
||||
F: drivers/gpu/drm/mgag200/
|
||||
|
||||
DRM DRIVER FOR PERVASIVE DISPLAYS REPAPER PANELS
|
||||
M: Noralf Trønnes <noralf@tronnes.org>
|
||||
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/
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ static atomic64_t dma_fence_context_counter = ATOMIC64_INIT(0);
|
|||
*/
|
||||
u64 dma_fence_context_alloc(unsigned num)
|
||||
{
|
||||
BUG_ON(!num);
|
||||
WARN_ON(!num);
|
||||
return atomic64_add_return(num, &dma_fence_context_counter) - num;
|
||||
}
|
||||
EXPORT_SYMBOL(dma_fence_context_alloc);
|
||||
|
|
@ -177,7 +177,7 @@ void dma_fence_release(struct kref *kref)
|
|||
|
||||
trace_dma_fence_destroy(fence);
|
||||
|
||||
BUG_ON(!list_empty(&fence->cb_list));
|
||||
WARN_ON(!list_empty(&fence->cb_list));
|
||||
|
||||
if (fence->ops->release)
|
||||
fence->ops->release(fence);
|
||||
|
|
|
|||
|
|
@ -96,9 +96,9 @@ static struct sync_timeline *sync_timeline_create(const char *name)
|
|||
obj->context = dma_fence_context_alloc(1);
|
||||
strlcpy(obj->name, name, sizeof(obj->name));
|
||||
|
||||
INIT_LIST_HEAD(&obj->child_list_head);
|
||||
INIT_LIST_HEAD(&obj->active_list_head);
|
||||
spin_lock_init(&obj->child_list_lock);
|
||||
obj->pt_tree = RB_ROOT;
|
||||
INIT_LIST_HEAD(&obj->pt_list);
|
||||
spin_lock_init(&obj->lock);
|
||||
|
||||
sync_timeline_debug_add(obj);
|
||||
|
||||
|
|
@ -135,28 +135,28 @@ static void sync_timeline_put(struct sync_timeline *obj)
|
|||
*/
|
||||
static void sync_timeline_signal(struct sync_timeline *obj, unsigned int inc)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct sync_pt *pt, *next;
|
||||
|
||||
trace_sync_timeline(obj);
|
||||
|
||||
spin_lock_irqsave(&obj->child_list_lock, flags);
|
||||
spin_lock_irq(&obj->lock);
|
||||
|
||||
obj->value += inc;
|
||||
|
||||
list_for_each_entry_safe(pt, next, &obj->active_list_head,
|
||||
active_list) {
|
||||
if (dma_fence_is_signaled_locked(&pt->base))
|
||||
list_del_init(&pt->active_list);
|
||||
list_for_each_entry_safe(pt, next, &obj->pt_list, link) {
|
||||
if (!dma_fence_is_signaled_locked(&pt->base))
|
||||
break;
|
||||
|
||||
list_del_init(&pt->link);
|
||||
rb_erase(&pt->node, &obj->pt_tree);
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&obj->child_list_lock, flags);
|
||||
spin_unlock_irq(&obj->lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* sync_pt_create() - creates a sync pt
|
||||
* @parent: fence's parent sync_timeline
|
||||
* @size: size to allocate for this pt
|
||||
* @inc: value of the fence
|
||||
*
|
||||
* Creates a new sync_pt as a child of @parent. @size bytes will be
|
||||
|
|
@ -164,26 +164,55 @@ static void sync_timeline_signal(struct sync_timeline *obj, unsigned int inc)
|
|||
* the generic sync_timeline struct. Returns the sync_pt object or
|
||||
* NULL in case of error.
|
||||
*/
|
||||
static struct sync_pt *sync_pt_create(struct sync_timeline *obj, int size,
|
||||
unsigned int value)
|
||||
static struct sync_pt *sync_pt_create(struct sync_timeline *obj,
|
||||
unsigned int value)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct sync_pt *pt;
|
||||
|
||||
if (size < sizeof(*pt))
|
||||
return NULL;
|
||||
|
||||
pt = kzalloc(size, GFP_KERNEL);
|
||||
pt = kzalloc(sizeof(*pt), GFP_KERNEL);
|
||||
if (!pt)
|
||||
return NULL;
|
||||
|
||||
spin_lock_irqsave(&obj->child_list_lock, flags);
|
||||
sync_timeline_get(obj);
|
||||
dma_fence_init(&pt->base, &timeline_fence_ops, &obj->child_list_lock,
|
||||
dma_fence_init(&pt->base, &timeline_fence_ops, &obj->lock,
|
||||
obj->context, value);
|
||||
list_add_tail(&pt->child_list, &obj->child_list_head);
|
||||
INIT_LIST_HEAD(&pt->active_list);
|
||||
spin_unlock_irqrestore(&obj->child_list_lock, flags);
|
||||
INIT_LIST_HEAD(&pt->link);
|
||||
|
||||
spin_lock_irq(&obj->lock);
|
||||
if (!dma_fence_is_signaled_locked(&pt->base)) {
|
||||
struct rb_node **p = &obj->pt_tree.rb_node;
|
||||
struct rb_node *parent = NULL;
|
||||
|
||||
while (*p) {
|
||||
struct sync_pt *other;
|
||||
int cmp;
|
||||
|
||||
parent = *p;
|
||||
other = rb_entry(parent, typeof(*pt), node);
|
||||
cmp = value - other->base.seqno;
|
||||
if (cmp > 0) {
|
||||
p = &parent->rb_right;
|
||||
} else if (cmp < 0) {
|
||||
p = &parent->rb_left;
|
||||
} else {
|
||||
if (dma_fence_get_rcu(&other->base)) {
|
||||
dma_fence_put(&pt->base);
|
||||
pt = other;
|
||||
goto unlock;
|
||||
}
|
||||
p = &parent->rb_left;
|
||||
}
|
||||
}
|
||||
rb_link_node(&pt->node, parent, p);
|
||||
rb_insert_color(&pt->node, &obj->pt_tree);
|
||||
|
||||
parent = rb_next(&pt->node);
|
||||
list_add_tail(&pt->link,
|
||||
parent ? &rb_entry(parent, typeof(*pt), node)->link : &obj->pt_list);
|
||||
}
|
||||
unlock:
|
||||
spin_unlock_irq(&obj->lock);
|
||||
|
||||
return pt;
|
||||
}
|
||||
|
||||
|
|
@ -203,13 +232,17 @@ static void timeline_fence_release(struct dma_fence *fence)
|
|||
{
|
||||
struct sync_pt *pt = dma_fence_to_sync_pt(fence);
|
||||
struct sync_timeline *parent = dma_fence_parent(fence);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(fence->lock, flags);
|
||||
list_del(&pt->child_list);
|
||||
if (!list_empty(&pt->active_list))
|
||||
list_del(&pt->active_list);
|
||||
spin_unlock_irqrestore(fence->lock, flags);
|
||||
if (!list_empty(&pt->link)) {
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(fence->lock, flags);
|
||||
if (!list_empty(&pt->link)) {
|
||||
list_del(&pt->link);
|
||||
rb_erase(&pt->node, &parent->pt_tree);
|
||||
}
|
||||
spin_unlock_irqrestore(fence->lock, flags);
|
||||
}
|
||||
|
||||
sync_timeline_put(parent);
|
||||
dma_fence_free(fence);
|
||||
|
|
@ -219,18 +252,11 @@ static bool timeline_fence_signaled(struct dma_fence *fence)
|
|||
{
|
||||
struct sync_timeline *parent = dma_fence_parent(fence);
|
||||
|
||||
return (fence->seqno > parent->value) ? false : true;
|
||||
return !__dma_fence_is_later(fence->seqno, parent->value);
|
||||
}
|
||||
|
||||
static bool timeline_fence_enable_signaling(struct dma_fence *fence)
|
||||
{
|
||||
struct sync_pt *pt = dma_fence_to_sync_pt(fence);
|
||||
struct sync_timeline *parent = dma_fence_parent(fence);
|
||||
|
||||
if (timeline_fence_signaled(fence))
|
||||
return false;
|
||||
|
||||
list_add_tail(&pt->active_list, &parent->active_list_head);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -309,7 +335,7 @@ static long sw_sync_ioctl_create_fence(struct sync_timeline *obj,
|
|||
goto err;
|
||||
}
|
||||
|
||||
pt = sync_pt_create(obj, sizeof(*pt), data.value);
|
||||
pt = sync_pt_create(obj, data.value);
|
||||
if (!pt) {
|
||||
err = -ENOMEM;
|
||||
goto err;
|
||||
|
|
@ -345,6 +371,11 @@ static long sw_sync_ioctl_inc(struct sync_timeline *obj, unsigned long arg)
|
|||
if (copy_from_user(&value, (void __user *)arg, sizeof(value)))
|
||||
return -EFAULT;
|
||||
|
||||
while (value > INT_MAX) {
|
||||
sync_timeline_signal(obj, INT_MAX);
|
||||
value -= INT_MAX;
|
||||
}
|
||||
|
||||
sync_timeline_signal(obj, value);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -116,17 +116,15 @@ static void sync_print_fence(struct seq_file *s,
|
|||
static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj)
|
||||
{
|
||||
struct list_head *pos;
|
||||
unsigned long flags;
|
||||
|
||||
seq_printf(s, "%s: %d\n", obj->name, obj->value);
|
||||
|
||||
spin_lock_irqsave(&obj->child_list_lock, flags);
|
||||
list_for_each(pos, &obj->child_list_head) {
|
||||
struct sync_pt *pt =
|
||||
container_of(pos, struct sync_pt, child_list);
|
||||
spin_lock_irq(&obj->lock);
|
||||
list_for_each(pos, &obj->pt_list) {
|
||||
struct sync_pt *pt = container_of(pos, struct sync_pt, link);
|
||||
sync_print_fence(s, &pt->base, false);
|
||||
}
|
||||
spin_unlock_irqrestore(&obj->child_list_lock, flags);
|
||||
spin_unlock_irq(&obj->lock);
|
||||
}
|
||||
|
||||
static void sync_print_sync_file(struct seq_file *s,
|
||||
|
|
@ -151,12 +149,11 @@ static void sync_print_sync_file(struct seq_file *s,
|
|||
|
||||
static int sync_debugfs_show(struct seq_file *s, void *unused)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct list_head *pos;
|
||||
|
||||
seq_puts(s, "objs:\n--------------\n");
|
||||
|
||||
spin_lock_irqsave(&sync_timeline_list_lock, flags);
|
||||
spin_lock_irq(&sync_timeline_list_lock);
|
||||
list_for_each(pos, &sync_timeline_list_head) {
|
||||
struct sync_timeline *obj =
|
||||
container_of(pos, struct sync_timeline,
|
||||
|
|
@ -165,11 +162,11 @@ static int sync_debugfs_show(struct seq_file *s, void *unused)
|
|||
sync_print_obj(s, obj);
|
||||
seq_putc(s, '\n');
|
||||
}
|
||||
spin_unlock_irqrestore(&sync_timeline_list_lock, flags);
|
||||
spin_unlock_irq(&sync_timeline_list_lock);
|
||||
|
||||
seq_puts(s, "fences:\n--------------\n");
|
||||
|
||||
spin_lock_irqsave(&sync_file_list_lock, flags);
|
||||
spin_lock_irq(&sync_file_list_lock);
|
||||
list_for_each(pos, &sync_file_list_head) {
|
||||
struct sync_file *sync_file =
|
||||
container_of(pos, struct sync_file, sync_file_list);
|
||||
|
|
@ -177,7 +174,7 @@ static int sync_debugfs_show(struct seq_file *s, void *unused)
|
|||
sync_print_sync_file(s, sync_file);
|
||||
seq_putc(s, '\n');
|
||||
}
|
||||
spin_unlock_irqrestore(&sync_file_list_lock, flags);
|
||||
spin_unlock_irq(&sync_file_list_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#define _LINUX_SYNC_H
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <linux/rbtree.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/dma-fence.h>
|
||||
|
||||
|
|
@ -24,42 +25,41 @@
|
|||
* struct sync_timeline - sync object
|
||||
* @kref: reference count on fence.
|
||||
* @name: name of the sync_timeline. Useful for debugging
|
||||
* @child_list_head: list of children sync_pts for this sync_timeline
|
||||
* @child_list_lock: lock protecting @child_list_head and fence.status
|
||||
* @active_list_head: list of active (unsignaled/errored) sync_pts
|
||||
* @lock: lock protecting @pt_list and @value
|
||||
* @pt_tree: rbtree of active (unsignaled/errored) sync_pts
|
||||
* @pt_list: list of active (unsignaled/errored) sync_pts
|
||||
* @sync_timeline_list: membership in global sync_timeline_list
|
||||
*/
|
||||
struct sync_timeline {
|
||||
struct kref kref;
|
||||
char name[32];
|
||||
|
||||
/* protected by child_list_lock */
|
||||
/* protected by lock */
|
||||
u64 context;
|
||||
int value;
|
||||
|
||||
struct list_head child_list_head;
|
||||
spinlock_t child_list_lock;
|
||||
|
||||
struct list_head active_list_head;
|
||||
struct rb_root pt_tree;
|
||||
struct list_head pt_list;
|
||||
spinlock_t lock;
|
||||
|
||||
struct list_head sync_timeline_list;
|
||||
};
|
||||
|
||||
static inline struct sync_timeline *dma_fence_parent(struct dma_fence *fence)
|
||||
{
|
||||
return container_of(fence->lock, struct sync_timeline, child_list_lock);
|
||||
return container_of(fence->lock, struct sync_timeline, lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* struct sync_pt - sync_pt object
|
||||
* @base: base fence object
|
||||
* @child_list: sync timeline child's list
|
||||
* @active_list: sync timeline active child's list
|
||||
* @link: link on the sync timeline's list
|
||||
* @node: node in the sync timeline's tree
|
||||
*/
|
||||
struct sync_pt {
|
||||
struct dma_fence base;
|
||||
struct list_head child_list;
|
||||
struct list_head active_list;
|
||||
struct list_head link;
|
||||
struct rb_node node;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SW_SYNC
|
||||
|
|
|
|||
|
|
@ -803,7 +803,6 @@ static struct drm_driver kms_driver = {
|
|||
.open = amdgpu_driver_open_kms,
|
||||
.postclose = amdgpu_driver_postclose_kms,
|
||||
.lastclose = amdgpu_driver_lastclose_kms,
|
||||
.set_busid = drm_pci_set_busid,
|
||||
.unload = amdgpu_driver_unload_kms,
|
||||
.get_vblank_counter = amdgpu_get_vblank_counter_kms,
|
||||
.enable_vblank = amdgpu_enable_vblank_kms,
|
||||
|
|
|
|||
|
|
@ -245,7 +245,6 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
|
|||
|
||||
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
|
||||
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_CAN_FORCE_OUTPUT;
|
||||
info->fbops = &amdgpufb_ops;
|
||||
|
||||
tmp = amdgpu_bo_gpu_offset(abo) - adev->mc.vram_start;
|
||||
|
|
|
|||
|
|
@ -263,7 +263,6 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
|
|||
{
|
||||
unsigned i, j;
|
||||
|
||||
drm_vblank_cleanup(adev->ddev);
|
||||
if (adev->irq.installed) {
|
||||
drm_irq_uninstall(adev->ddev);
|
||||
adev->irq.installed = false;
|
||||
|
|
|
|||
|
|
@ -1867,7 +1867,7 @@ static void dce_v10_0_afmt_setmode(struct drm_encoder *encoder,
|
|||
dce_v10_0_audio_write_sad_regs(encoder);
|
||||
dce_v10_0_audio_write_latency_fields(encoder, mode);
|
||||
|
||||
err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode);
|
||||
err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode, false);
|
||||
if (err < 0) {
|
||||
DRM_ERROR("failed to setup AVI infoframe: %zd\n", err);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1851,7 +1851,7 @@ static void dce_v11_0_afmt_setmode(struct drm_encoder *encoder,
|
|||
dce_v11_0_audio_write_sad_regs(encoder);
|
||||
dce_v11_0_audio_write_latency_fields(encoder, mode);
|
||||
|
||||
err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode);
|
||||
err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode, false);
|
||||
if (err < 0) {
|
||||
DRM_ERROR("failed to setup AVI infoframe: %zd\n", err);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1597,7 +1597,7 @@ static void dce_v6_0_audio_set_avi_infoframe(struct drm_encoder *encoder,
|
|||
ssize_t err;
|
||||
u32 tmp;
|
||||
|
||||
err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode);
|
||||
err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode, false);
|
||||
if (err < 0) {
|
||||
DRM_ERROR("failed to setup AVI infoframe: %zd\n", err);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1750,7 +1750,7 @@ static void dce_v8_0_afmt_setmode(struct drm_encoder *encoder,
|
|||
dce_v8_0_audio_write_sad_regs(encoder);
|
||||
dce_v8_0_audio_write_latency_fields(encoder, mode);
|
||||
|
||||
err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode);
|
||||
err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode, false);
|
||||
if (err < 0) {
|
||||
DRM_ERROR("failed to setup AVI infoframe: %zd\n", err);
|
||||
return;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue