diff options
| author | Dave Airlie <airlied@redhat.com> | 2018-07-31 18:54:27 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2018-07-31 18:54:35 -0400 |
| commit | 51973dc079a9e1e082ae647ee3804f324a258eee (patch) | |
| tree | 852298268bbb8901fc2b696691717ce6cf293a12 /drivers/gpu | |
| parent | acb1872577b346bd15ab3a3f8dff780d6cca4b70 (diff) | |
| parent | a6a00918d4ad8718c3ccde38c02cec17f116b2fd (diff) | |
Merge tag 'drm-misc-fixes-2018-07-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
drm-misc-fixes pull request for v4.18-rc7:
- Small fixes to drm_atomic_helper_async_check(). (bbrezillon)
- Fix error handling in drm_legacy_addctx(). (Nicholas)
- Handle register reset on hotplug in adv7511. (seanpaul)
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/90e0e966-bce5-15a4-286a-eda908788b03@linux.intel.com
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 12 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_context.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/vc4/vc4_plane.c | 3 |
4 files changed, 21 insertions, 4 deletions
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index 73021b388e12..dd3ff2f2cdce 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | |||
| @@ -429,6 +429,18 @@ static void adv7511_hpd_work(struct work_struct *work) | |||
| 429 | else | 429 | else |
| 430 | status = connector_status_disconnected; | 430 | status = connector_status_disconnected; |
| 431 | 431 | ||
| 432 | /* | ||
| 433 | * The bridge resets its registers on unplug. So when we get a plug | ||
| 434 | * event and we're already supposed to be powered, cycle the bridge to | ||
| 435 | * restore its state. | ||
| 436 | */ | ||
| 437 | if (status == connector_status_connected && | ||
| 438 | adv7511->connector.status == connector_status_disconnected && | ||
| 439 | adv7511->powered) { | ||
| 440 | regcache_mark_dirty(adv7511->regmap); | ||
| 441 | adv7511_power_on(adv7511); | ||
| 442 | } | ||
| 443 | |||
| 432 | if (adv7511->connector.status != status) { | 444 | if (adv7511->connector.status != status) { |
| 433 | adv7511->connector.status = status; | 445 | adv7511->connector.status = status; |
| 434 | if (status == connector_status_disconnected) | 446 | if (status == connector_status_disconnected) |
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 130da5195f3b..81e32199d3ef 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c | |||
| @@ -1510,8 +1510,9 @@ int drm_atomic_helper_async_check(struct drm_device *dev, | |||
| 1510 | { | 1510 | { |
| 1511 | struct drm_crtc *crtc; | 1511 | struct drm_crtc *crtc; |
| 1512 | struct drm_crtc_state *crtc_state; | 1512 | struct drm_crtc_state *crtc_state; |
| 1513 | struct drm_plane *plane; | 1513 | struct drm_plane *plane = NULL; |
| 1514 | struct drm_plane_state *old_plane_state, *new_plane_state; | 1514 | struct drm_plane_state *old_plane_state = NULL; |
| 1515 | struct drm_plane_state *new_plane_state = NULL; | ||
| 1515 | const struct drm_plane_helper_funcs *funcs; | 1516 | const struct drm_plane_helper_funcs *funcs; |
| 1516 | int i, n_planes = 0; | 1517 | int i, n_planes = 0; |
| 1517 | 1518 | ||
| @@ -1527,7 +1528,8 @@ int drm_atomic_helper_async_check(struct drm_device *dev, | |||
| 1527 | if (n_planes != 1) | 1528 | if (n_planes != 1) |
| 1528 | return -EINVAL; | 1529 | return -EINVAL; |
| 1529 | 1530 | ||
| 1530 | if (!new_plane_state->crtc) | 1531 | if (!new_plane_state->crtc || |
| 1532 | old_plane_state->crtc != new_plane_state->crtc) | ||
| 1531 | return -EINVAL; | 1533 | return -EINVAL; |
| 1532 | 1534 | ||
| 1533 | funcs = plane->helper_private; | 1535 | funcs = plane->helper_private; |
diff --git a/drivers/gpu/drm/drm_context.c b/drivers/gpu/drm/drm_context.c index 3c4000facb36..f973d287696a 100644 --- a/drivers/gpu/drm/drm_context.c +++ b/drivers/gpu/drm/drm_context.c | |||
| @@ -372,7 +372,7 @@ int drm_legacy_addctx(struct drm_device *dev, void *data, | |||
| 372 | ctx->handle = drm_legacy_ctxbitmap_next(dev); | 372 | ctx->handle = drm_legacy_ctxbitmap_next(dev); |
| 373 | } | 373 | } |
| 374 | DRM_DEBUG("%d\n", ctx->handle); | 374 | DRM_DEBUG("%d\n", ctx->handle); |
| 375 | if (ctx->handle == -1) { | 375 | if (ctx->handle < 0) { |
| 376 | DRM_DEBUG("Not enough free contexts.\n"); | 376 | DRM_DEBUG("Not enough free contexts.\n"); |
| 377 | /* Should this return -EBUSY instead? */ | 377 | /* Should this return -EBUSY instead? */ |
| 378 | return -ENOMEM; | 378 | return -ENOMEM; |
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 1d34619eb3fe..a951ec75d01f 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c | |||
| @@ -320,6 +320,9 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) | |||
| 320 | vc4_state->x_scaling[0] = VC4_SCALING_TPZ; | 320 | vc4_state->x_scaling[0] = VC4_SCALING_TPZ; |
| 321 | if (vc4_state->y_scaling[0] == VC4_SCALING_NONE) | 321 | if (vc4_state->y_scaling[0] == VC4_SCALING_NONE) |
| 322 | vc4_state->y_scaling[0] = VC4_SCALING_TPZ; | 322 | vc4_state->y_scaling[0] = VC4_SCALING_TPZ; |
| 323 | } else { | ||
| 324 | vc4_state->x_scaling[1] = VC4_SCALING_NONE; | ||
| 325 | vc4_state->y_scaling[1] = VC4_SCALING_NONE; | ||
| 323 | } | 326 | } |
| 324 | 327 | ||
| 325 | vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE && | 328 | vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE && |
