Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commitcec1b94

Browse files
committed
Merge tag 'imx-drm-fixes-2018-03-22' of git://git.pengutronix.de/git/pza/linux into drm-fixes
drm/imx: fixes for early vblank event issue, array underflow error- fix an array underflow error by reordering the range check before the array subscript in ipu-prg.- make some local functions static in ipuv3-plane.- add a missng header for ipu_planes_assign_pre in ipuv3-plane.- move arming of the vblank event from atomic_begin to atomic_flush, to avoid signalling atomic commit completion to userspace before plane atomic_update has finished, due to a race condition that is likely to be hit on i.MX6QP on PRE enabled channels.* tag 'imx-drm-fixes-2018-03-22' of git://git.pengutronix.de/git/pza/linux: drm/imx: move arming of the vblank event to atomic_flush drm/imx: ipuv3-plane: Include "imx-drm.h" header file drm/imx: ipuv3-plane: Make functions static when possible gpu: ipu-v3: prg: avoid possible array underflow
2 parents82269df +6a055b9 commitcec1b94

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

‎drivers/gpu/drm/imx/ipuv3-crtc.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,11 @@ static void ipu_crtc_atomic_begin(struct drm_crtc *crtc,
225225
structdrm_crtc_state*old_crtc_state)
226226
{
227227
drm_crtc_vblank_on(crtc);
228+
}
228229

230+
staticvoidipu_crtc_atomic_flush(structdrm_crtc*crtc,
231+
structdrm_crtc_state*old_crtc_state)
232+
{
229233
spin_lock_irq(&crtc->dev->event_lock);
230234
if (crtc->state->event) {
231235
WARN_ON(drm_crtc_vblank_get(crtc));
@@ -293,6 +297,7 @@ static const struct drm_crtc_helper_funcs ipu_helper_funcs = {
293297
.mode_set_nofb=ipu_crtc_mode_set_nofb,
294298
.atomic_check=ipu_crtc_atomic_check,
295299
.atomic_begin=ipu_crtc_atomic_begin,
300+
.atomic_flush=ipu_crtc_atomic_flush,
296301
.atomic_disable=ipu_crtc_atomic_disable,
297302
.atomic_enable=ipu_crtc_atomic_enable,
298303
};

‎drivers/gpu/drm/imx/ipuv3-plane.c‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include<drm/drm_plane_helper.h>
2323

2424
#include"video/imx-ipu-v3.h"
25+
#include"imx-drm.h"
2526
#include"ipuv3-plane.h"
2627

2728
structipu_plane_state {
@@ -272,7 +273,7 @@ static void ipu_plane_destroy(struct drm_plane *plane)
272273
kfree(ipu_plane);
273274
}
274275

275-
voidipu_plane_state_reset(structdrm_plane*plane)
276+
staticvoidipu_plane_state_reset(structdrm_plane*plane)
276277
{
277278
structipu_plane_state*ipu_state;
278279

@@ -292,7 +293,8 @@ void ipu_plane_state_reset(struct drm_plane *plane)
292293
plane->state=&ipu_state->base;
293294
}
294295

295-
structdrm_plane_state*ipu_plane_duplicate_state(structdrm_plane*plane)
296+
staticstructdrm_plane_state*
297+
ipu_plane_duplicate_state(structdrm_plane*plane)
296298
{
297299
structipu_plane_state*state;
298300

@@ -306,8 +308,8 @@ struct drm_plane_state *ipu_plane_duplicate_state(struct drm_plane *plane)
306308
return&state->base;
307309
}
308310

309-
voidipu_plane_destroy_state(structdrm_plane*plane,
310-
structdrm_plane_state*state)
311+
staticvoidipu_plane_destroy_state(structdrm_plane*plane,
312+
structdrm_plane_state*state)
311313
{
312314
structipu_plane_state*ipu_state=to_ipu_plane_state(state);
313315

‎drivers/gpu/ipu-v3/ipu-prg.c‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,14 @@ void ipu_prg_channel_disable(struct ipuv3_channel *ipu_chan)
250250
{
251251
intprg_chan=ipu_prg_ipu_to_prg_chan(ipu_chan->num);
252252
structipu_prg*prg=ipu_chan->ipu->prg_priv;
253-
structipu_prg_channel*chan=&prg->chan[prg_chan];
253+
structipu_prg_channel*chan;
254254
u32val;
255255

256-
if (!chan->enabled||prg_chan<0)
256+
if (prg_chan<0)
257+
return;
258+
259+
chan=&prg->chan[prg_chan];
260+
if (!chan->enabled)
257261
return;
258262

259263
pm_runtime_get_sync(prg->dev);
@@ -280,13 +284,15 @@ int ipu_prg_channel_configure(struct ipuv3_channel *ipu_chan,
280284
{
281285
intprg_chan=ipu_prg_ipu_to_prg_chan(ipu_chan->num);
282286
structipu_prg*prg=ipu_chan->ipu->prg_priv;
283-
structipu_prg_channel*chan=&prg->chan[prg_chan];
287+
structipu_prg_channel*chan;
284288
u32val;
285289
intret;
286290

287291
if (prg_chan<0)
288292
returnprg_chan;
289293

294+
chan=&prg->chan[prg_chan];
295+
290296
if (chan->enabled) {
291297
ipu_pre_update(prg->pres[chan->used_pre],*eba);
292298
return0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp