Skip to content

Commit b26389e

Browse files
committed
Merge tag 'drm-misc-fixes-2021-05-27' of ssh://git.freedesktop.org/git/drm/drm-misc into drm-fixes
A fix in meson for a crash at shutdown and one for TTM to prevent irrelevant swapout Signed-off-by: Dave Airlie <[email protected]> From: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20210527120828.3w7f53krzkslc4ii@gilmour
2 parents ac6e9e3 + 35f819d commit b26389e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

drivers/gpu/drm/meson/meson_drv.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,11 +485,12 @@ static int meson_probe_remote(struct platform_device *pdev,
485485
static void meson_drv_shutdown(struct platform_device *pdev)
486486
{
487487
struct meson_drm *priv = dev_get_drvdata(&pdev->dev);
488-
struct drm_device *drm = priv->drm;
489488

490-
DRM_DEBUG_DRIVER("\n");
491-
drm_kms_helper_poll_fini(drm);
492-
drm_atomic_helper_shutdown(drm);
489+
if (!priv)
490+
return;
491+
492+
drm_kms_helper_poll_fini(priv->drm);
493+
drm_atomic_helper_shutdown(priv->drm);
493494
}
494495

495496
static int meson_drv_probe(struct platform_device *pdev)

drivers/gpu/drm/ttm/ttm_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ int ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
145145
list_for_each_entry(bo, &man->lru[j], lru) {
146146
uint32_t num_pages;
147147

148-
if (!bo->ttm ||
148+
if (!bo->ttm || !ttm_tt_is_populated(bo->ttm) ||
149149
bo->ttm->page_flags & TTM_PAGE_FLAG_SG ||
150150
bo->ttm->page_flags & TTM_PAGE_FLAG_SWAPPED)
151151
continue;

0 commit comments

Comments
 (0)