Skip to content

Commit 09ef237

Browse files
committed
Merge tag 'drm-misc-next-2017-08-08' of git://anongit.freedesktop.org/git/drm-misc into drm-next
UAPI Changes: - vc4: Add ioctl to allow attaching a label to a bo (Eric) - Add new format/modifier blob plane property (Ben) - armada: Use __u32/__u64 instead of uint32_t/uint64_t (Mikko) - [kinda uapi] fb_helper: Expose display_info size via fb_info (David) Core Changes: - Default gem_dumb_[map_offset|destroy] as mmap/destroy implementations (Noralf) - Simplify atomic properties by removing the helpers and handling in core (Daniel) Driver Changes: - stm: Add STM32 DSI controller driver (Phillipe) - vc4: Add HDMI CEC support (Hans) - rockchip: Refactor register init & soc version handling (Mark) - misc: Remove .load_lut, .gamma_set, .gamma_get dead code (Peter) - dw-hdmi: Add HDMI CEC support (Russell) Cc: Philippe CORNU <philippe.cornu@st.com> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: Eric Anholt <eric@anholt.net> Cc: Noralf Trønnes <noralf@tronnes.org> Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Mark yao <mark.yao@rock-chips.com> Cc: Peter Rosin <peda@axentia.se> Cc: Russell King <rmk+kernel@armlinux.org.uk> Cc: Mikko Rapeli <mikko.rapeli@iki.fi> Cc: David Lechner <david@lechnology.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> * tag 'drm-misc-next-2017-08-08' of git://anongit.freedesktop.org/git/drm-misc: (107 commits) drm: Nuke drm_atomic_legacy_backoff drm: Nuke drm_atomic_helper_connector_dpms drm: Nuke drm_atomic_helper_connector_set_property drm: Nuke drm_atomic_helper_plane_set_property drm: Nuke drm_atomic_helper_crtc_set_property drm: Handle properties in the core for atomic drivers drm: Don't update property values for atomic drivers drm/omap: Rework the rotation-on-crtc hack drm/radeon: Use the drm_driver.dumb_destroy default drm/i915: Use the drm_driver.dumb_destroy default drm/sti: Use .dumb_map_offset and .dumb_destroy defaults drm: bridge: synopsys/dw-hdmi: Provide default configuration function for HDMI 2.0 PHY drm/fb-helper: pass physical dimensions to fbdev uapi drm/armada_drm.h: use __u32 and __u64 instead of uint32_t and uint64_t drm/bridge: dw-hdmi: remove CEC engine register definitions drm/bridge: dw-hdmi: add cec driver drm/bridge: dw-hdmi: add missing cec_notifier_put drm: remove unused and redundant callbacks staging: vboxvideo: remove dead gamma lut code drm: dw-hdmi-i2s: add missing company name on Copyright ...
2 parents d720661 + 16fece0 commit 09ef237

236 files changed

Lines changed: 3820 additions & 2278 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/devicetree/bindings/display/rockchip/rockchip-vop.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ Required properties:
88
- compatible: value should be one of the following
99
"rockchip,rk3036-vop";
1010
"rockchip,rk3288-vop";
11+
"rockchip,rk3368-vop";
12+
"rockchip,rk3366-vop";
1113
"rockchip,rk3399-vop-big";
1214
"rockchip,rk3399-vop-lit";
15+
"rockchip,rk3228-vop";
16+
"rockchip,rk3328-vop";
1317

1418
- interrupts: should contain a list of all VOP IP block interrupts in the
1519
order: VSYNC, LCD_SYSTEM. The interrupt specifier

‎Documentation/devicetree/bindings/display/st,stm32-ltdc.txt‎

Lines changed: 103 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
* STMicroelectronics STM32 lcd-tft display controller
22

33
- ltdc: lcd-tft display controller host
4-
must be a sub-node of st-display-subsystem
54
Required properties:
65
- compatible: "st,stm32-ltdc"
76
- reg: Physical base address of the IP registers and length of memory mapped region.
@@ -13,8 +12,40 @@
1312
Required nodes:
1413
- Video port for RGB output.
1514

16-
Example:
15+
* STMicroelectronics STM32 DSI controller specific extensions to Synopsys
16+
DesignWare MIPI DSI host controller
1717

18+
The STMicroelectronics STM32 DSI controller uses the Synopsys DesignWare MIPI
19+
DSI host controller. For all mandatory properties & nodes, please refer
20+
to the related documentation in [5].
21+
22+
Mandatory properties specific to STM32 DSI:
23+
- #address-cells: Should be <1>.
24+
- #size-cells: Should be <0>.
25+
- compatible: "st,stm32-dsi".
26+
- clock-names:
27+
- phy pll reference clock string name, must be "ref".
28+
- resets: see [5].
29+
- reset-names: see [5].
30+
31+
Mandatory nodes specific to STM32 DSI:
32+
- ports: A node containing DSI input & output port nodes with endpoint
33+
definitions as documented in [3] & [4].
34+
- port@0: DSI input port node, connected to the ltdc rgb output port.
35+
- port@1: DSI output port node, connected to a panel or a bridge input port.
36+
- panel or bridge node: A node containing the panel or bridge description as
37+
documented in [6].
38+
- port: panel or bridge port node, connected to the DSI output port (port@1).
39+
40+
Note: You can find more documentation in the following references
41+
[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
42+
[2] Documentation/devicetree/bindings/reset/reset.txt
43+
[3] Documentation/devicetree/bindings/media/video-interfaces.txt
44+
[4] Documentation/devicetree/bindings/graph.txt
45+
[5] Documentation/devicetree/bindings/display/bridge/dw_mipi_dsi.txt
46+
[6] Documentation/devicetree/bindings/display/mipi-dsi-bus.txt
47+
48+
Example 1: RGB panel
1849
/ {
1950
...
2051
soc {
@@ -34,3 +65,73 @@ Example:
3465
};
3566
};
3667
};
68+
69+
Example 2: DSI panel
70+
71+
/ {
72+
...
73+
soc {
74+
...
75+
ltdc: display-controller@40016800 {
76+
compatible = "st,stm32-ltdc";
77+
reg = <0x40016800 0x200>;
78+
interrupts = <88>, <89>;
79+
resets = <&rcc STM32F4_APB2_RESET(LTDC)>;
80+
clocks = <&rcc 1 CLK_LCD>;
81+
clock-names = "lcd";
82+
83+
port {
84+
ltdc_out_dsi: endpoint {
85+
remote-endpoint = <&dsi_in>;
86+
};
87+
};
88+
};
89+
90+
91+
dsi: dsi@40016c00 {
92+
#address-cells = <1>;
93+
#size-cells = <0>;
94+
compatible = "st,stm32-dsi";
95+
reg = <0x40016c00 0x800>;
96+
clocks = <&rcc 1 CLK_F469_DSI>, <&clk_hse>;
97+
clock-names = "ref", "pclk";
98+
resets = <&rcc STM32F4_APB2_RESET(DSI)>;
99+
reset-names = "apb";
100+
101+
ports {
102+
#address-cells = <1>;
103+
#size-cells = <0>;
104+
105+
port@0 {
106+
reg = <0>;
107+
dsi_in: endpoint {
108+
remote-endpoint = <&ltdc_out_dsi>;
109+
};
110+
};
111+
112+
port@1 {
113+
reg = <1>;
114+
dsi_out: endpoint {
115+
remote-endpoint = <&dsi_in_panel>;
116+
};
117+
};
118+
119+
};
120+
121+
panel-dsi@0 {
122+
reg = <0>; /* dsi virtual channel (0..3) */
123+
compatible = ...;
124+
enable-gpios = ...;
125+
126+
port {
127+
dsi_in_panel: endpoint {
128+
remote-endpoint = <&dsi_out>;
129+
};
130+
};
131+
132+
};
133+
134+
};
135+
136+
};
137+
};

‎Documentation/gpu/todo.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ This would be especially useful for tinydrm:
108108
crtc state, clear that to the max values, x/y = 0 and w/h = MAX_INT, in
109109
__drm_atomic_helper_crtc_duplicate_state().
110110

111-
- Move tinydrm_merge_clips into drm_framebuffer.c, dropping the tinydrm_
112-
prefix ofc and using drm_fb_. drm_framebuffer.c makes sense since this
111+
- Move tinydrm_merge_clips into drm_framebuffer.c, dropping the tinydrm\_
112+
prefix ofc and using drm_fb\_. drm_framebuffer.c makes sense since this
113113
is a function useful to implement the fb->dirty function.
114114

115115
- Create a new drm_fb_dirty function which does essentially what e.g.

‎drivers/dma-buf/sw_sync.c‎

Lines changed: 80 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,75 @@ static void sync_timeline_put(struct sync_timeline *obj)
125125
kref_put(&obj->kref, sync_timeline_free);
126126
}
127127

128+
static const char *timeline_fence_get_driver_name(struct dma_fence *fence)
129+
{
130+
return "sw_sync";
131+
}
132+
133+
static const char *timeline_fence_get_timeline_name(struct dma_fence *fence)
134+
{
135+
struct sync_timeline *parent = dma_fence_parent(fence);
136+
137+
return parent->name;
138+
}
139+
140+
static void timeline_fence_release(struct dma_fence *fence)
141+
{
142+
struct sync_pt *pt = dma_fence_to_sync_pt(fence);
143+
struct sync_timeline *parent = dma_fence_parent(fence);
144+
145+
if (!list_empty(&pt->link)) {
146+
unsigned long flags;
147+
148+
spin_lock_irqsave(fence->lock, flags);
149+
if (!list_empty(&pt->link)) {
150+
list_del(&pt->link);
151+
rb_erase(&pt->node, &parent->pt_tree);
152+
}
153+
spin_unlock_irqrestore(fence->lock, flags);
154+
}
155+
156+
sync_timeline_put(parent);
157+
dma_fence_free(fence);
158+
}
159+
160+
static bool timeline_fence_signaled(struct dma_fence *fence)
161+
{
162+
struct sync_timeline *parent = dma_fence_parent(fence);
163+
164+
return !__dma_fence_is_later(fence->seqno, parent->value);
165+
}
166+
167+
static bool timeline_fence_enable_signaling(struct dma_fence *fence)
168+
{
169+
return true;
170+
}
171+
172+
static void timeline_fence_value_str(struct dma_fence *fence,
173+
char *str, int size)
174+
{
175+
snprintf(str, size, "%d", fence->seqno);
176+
}
177+
178+
static void timeline_fence_timeline_value_str(struct dma_fence *fence,
179+
char *str, int size)
180+
{
181+
struct sync_timeline *parent = dma_fence_parent(fence);
182+
183+
snprintf(str, size, "%d", parent->value);
184+
}
185+
186+
static const struct dma_fence_ops timeline_fence_ops = {
187+
.get_driver_name = timeline_fence_get_driver_name,
188+
.get_timeline_name = timeline_fence_get_timeline_name,
189+
.enable_signaling = timeline_fence_enable_signaling,
190+
.signaled = timeline_fence_signaled,
191+
.wait = dma_fence_default_wait,
192+
.release = timeline_fence_release,
193+
.fence_value_str = timeline_fence_value_str,
194+
.timeline_value_str = timeline_fence_timeline_value_str,
195+
};
196+
128197
/**
129198
* sync_timeline_signal() - signal a status change on a sync_timeline
130199
* @obj: sync_timeline to signal
@@ -144,11 +213,21 @@ static void sync_timeline_signal(struct sync_timeline *obj, unsigned int inc)
144213
obj->value += inc;
145214

146215
list_for_each_entry_safe(pt, next, &obj->pt_list, link) {
147-
if (!dma_fence_is_signaled_locked(&pt->base))
216+
if (!timeline_fence_signaled(&pt->base))
148217
break;
149218

150219
list_del_init(&pt->link);
151220
rb_erase(&pt->node, &obj->pt_tree);
221+
222+
/*
223+
* A signal callback may release the last reference to this
224+
* fence, causing it to be freed. That operation has to be
225+
* last to avoid a use after free inside this loop, and must
226+
* be after we remove the fence from the timeline in order to
227+
* prevent deadlocking on timeline->lock inside
228+
* timeline_fence_release().
229+
*/
230+
dma_fence_signal_locked(&pt->base);
152231
}
153232

154233
spin_unlock_irq(&obj->lock);
@@ -216,75 +295,6 @@ static struct sync_pt *sync_pt_create(struct sync_timeline *obj,
216295
return pt;
217296
}
218297

219-
static const char *timeline_fence_get_driver_name(struct dma_fence *fence)
220-
{
221-
return "sw_sync";
222-
}
223-
224-
static const char *timeline_fence_get_timeline_name(struct dma_fence *fence)
225-
{
226-
struct sync_timeline *parent = dma_fence_parent(fence);
227-
228-
return parent->name;
229-
}
230-
231-
static void timeline_fence_release(struct dma_fence *fence)
232-
{
233-
struct sync_pt *pt = dma_fence_to_sync_pt(fence);
234-
struct sync_timeline *parent = dma_fence_parent(fence);
235-
236-
if (!list_empty(&pt->link)) {
237-
unsigned long flags;
238-
239-
spin_lock_irqsave(fence->lock, flags);
240-
if (!list_empty(&pt->link)) {
241-
list_del(&pt->link);
242-
rb_erase(&pt->node, &parent->pt_tree);
243-
}
244-
spin_unlock_irqrestore(fence->lock, flags);
245-
}
246-
247-
sync_timeline_put(parent);
248-
dma_fence_free(fence);
249-
}
250-
251-
static bool timeline_fence_signaled(struct dma_fence *fence)
252-
{
253-
struct sync_timeline *parent = dma_fence_parent(fence);
254-
255-
return !__dma_fence_is_later(fence->seqno, parent->value);
256-
}
257-
258-
static bool timeline_fence_enable_signaling(struct dma_fence *fence)
259-
{
260-
return true;
261-
}
262-
263-
static void timeline_fence_value_str(struct dma_fence *fence,
264-
char *str, int size)
265-
{
266-
snprintf(str, size, "%d", fence->seqno);
267-
}
268-
269-
static void timeline_fence_timeline_value_str(struct dma_fence *fence,
270-
char *str, int size)
271-
{
272-
struct sync_timeline *parent = dma_fence_parent(fence);
273-
274-
snprintf(str, size, "%d", parent->value);
275-
}
276-
277-
static const struct dma_fence_ops timeline_fence_ops = {
278-
.get_driver_name = timeline_fence_get_driver_name,
279-
.get_timeline_name = timeline_fence_get_timeline_name,
280-
.enable_signaling = timeline_fence_enable_signaling,
281-
.signaled = timeline_fence_signaled,
282-
.wait = dma_fence_default_wait,
283-
.release = timeline_fence_release,
284-
.fence_value_str = timeline_fence_value_str,
285-
.timeline_value_str = timeline_fence_timeline_value_str,
286-
};
287-
288298
/*
289299
* *WARNING*
290300
*

‎drivers/dma-buf/sync_file.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ static int sync_file_release(struct inode *inode, struct file *file)
304304
{
305305
struct sync_file *sync_file = file->private_data;
306306

307-
if (test_bit(POLL_ENABLED, &sync_file->fence->flags))
307+
if (test_bit(POLL_ENABLED, &sync_file->flags))
308308
dma_fence_remove_callback(sync_file->fence, &sync_file->cb);
309309
dma_fence_put(sync_file->fence);
310310
kfree(sync_file);
@@ -318,7 +318,8 @@ static unsigned int sync_file_poll(struct file *file, poll_table *wait)
318318

319319
poll_wait(file, &sync_file->wq, wait);
320320

321-
if (!test_and_set_bit(POLL_ENABLED, &sync_file->fence->flags)) {
321+
if (list_empty(&sync_file->cb.node) &&
322+
!test_and_set_bit(POLL_ENABLED, &sync_file->flags)) {
322323
if (dma_fence_add_callback(sync_file->fence, &sync_file->cb,
323324
fence_check_cb_func) < 0)
324325
wake_up_all(&sync_file->wq);

‎drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,6 @@ static struct drm_driver kms_driver = {
834834
.gem_close_object = amdgpu_gem_object_close,
835835
.dumb_create = amdgpu_mode_dumb_create,
836836
.dumb_map_offset = amdgpu_mode_dumb_mmap,
837-
.dumb_destroy = drm_gem_dumb_destroy,
838837
.fops = &amdgpu_driver_kms_fops,
839838

840839
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,

‎drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -311,31 +311,7 @@ static int amdgpu_fbdev_destroy(struct drm_device *dev, struct amdgpu_fbdev *rfb
311311
return 0;
312312
}
313313

314-
/** Sets the color ramps on behalf of fbcon */
315-
static void amdgpu_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
316-
u16 blue, int regno)
317-
{
318-
struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
319-
320-
amdgpu_crtc->lut_r[regno] = red >> 6;
321-
amdgpu_crtc->lut_g[regno] = green >> 6;
322-
amdgpu_crtc->lut_b[regno] = blue >> 6;
323-
}
324-
325-
/** Gets the color ramps on behalf of fbcon */
326-
static void amdgpu_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
327-
u16 *blue, int regno)
328-
{
329-
struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
330-
331-
*red = amdgpu_crtc->lut_r[regno] << 6;
332-
*green = amdgpu_crtc->lut_g[regno] << 6;
333-
*blue = amdgpu_crtc->lut_b[regno] << 6;
334-
}
335-
336314
static const struct drm_fb_helper_funcs amdgpu_fb_helper_funcs = {
337-
.gamma_set = amdgpu_crtc_fb_gamma_set,
338-
.gamma_get = amdgpu_crtc_fb_gamma_get,
339315
.fb_probe = amdgpufb_create,
340316
};
341317

‎drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,6 @@ struct amdgpu_atom_ss {
357357
struct amdgpu_crtc {
358358
struct drm_crtc base;
359359
int crtc_id;
360-
u16 lut_r[256], lut_g[256], lut_b[256];
361360
bool enabled;
362361
bool can_tile;
363362
uint32_t crtc_offset;

0 commit comments

Comments
 (0)