Skip to content

Commit

Permalink
drm/ast: Add an crtc_disable callback to the crtc helper funcs
Browse files Browse the repository at this point in the history
Implement the proper CRTC disablement, just like done in mgag200
driver.

Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Egbert Eich authored and Dave Airlie committed Aug 2, 2017
1 parent b2d44e2 commit ab209c3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions drivers/gpu/drm/ast/ast_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,23 @@ static int ast_crtc_mode_set(struct drm_crtc *crtc,

static void ast_crtc_disable(struct drm_crtc *crtc)
{
int ret;

DRM_DEBUG_KMS("\n");
ast_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
if (crtc->primary->fb) {
struct ast_framebuffer *ast_fb = to_ast_framebuffer(crtc->primary->fb);
struct drm_gem_object *obj = ast_fb->obj;
struct ast_bo *bo = gem_to_ast_bo(obj);

ret = ast_bo_reserve(bo, false);
if (ret)
return;

ast_bo_push_sysram(bo);
ast_bo_unreserve(bo);
}
crtc->primary->fb = NULL;
}

static void ast_crtc_prepare(struct drm_crtc *crtc)
Expand Down

0 comments on commit ab209c3

Please sign in to comment.