From patchwork Thu Jan 23 08:52:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 3527111 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 87235C02DD for ; Thu, 23 Jan 2014 08:55:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AC959201BA for ; Thu, 23 Jan 2014 08:55:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E8EF220181 for ; Thu, 23 Jan 2014 08:55:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0010EFBE4C; Thu, 23 Jan 2014 00:55:21 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ea0-f177.google.com (mail-ea0-f177.google.com [209.85.215.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CC98FB7C8 for ; Thu, 23 Jan 2014 00:54:11 -0800 (PST) Received: by mail-ea0-f177.google.com with SMTP id n15so261057ead.22 for ; Thu, 23 Jan 2014 00:54:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=itZz19kvV30+eFpFufVgq1Jn86/9HXgHbsjJ5egWtYM=; b=h25TSwyI7wyxBRf8pshkM65+2v1dCsuMs+AUDuGg957aB8QoGDeg3ywuIaWgNxqpCG wX0ZO/2ZH+5e9roLeLbnSkq1cKeTYVpHuAMMQrCnJsoC8R2DwrjXhx2osl+NwhDnhKW9 0seGPuAqdvjeaEdvxOMIDquEsWhHEQ2k7DKlI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=itZz19kvV30+eFpFufVgq1Jn86/9HXgHbsjJ5egWtYM=; b=cpq2M5OO/yED6/aKpC7/OCADMikM2WK92+DOf8+cZMe4RRbIfbKLArSML+udW1H+/1 OBWKFzBzCXPS+pM34jfRIFcrHkkOp58FvY1LbRvP4P9L0goos7ReoQCPMJyykukQNtfU avR9cgD0f0NNrxF9i/r+jDOnbNXakoRU33MQCORyf3goq8Wjkkje0aqC0w/ljLzdzBT+ fsukK230ZvvG4wQ07tBzDo11RMlJ1DKW2/vX/g41d15xh1mRH000IXYZyaxMgskenNIB zE3n66BHdHMJ6nEFQp4YVsoMM3aPj3xSdKVWVer0n44H6z18YJ0QZKQE/Ul8jk8ZyTaz 0+dw== X-Gm-Message-State: ALoCoQnsQtx4fUO2BOt6LyzAkFxJhOcTbfa44ts9KM/B4gbtLrra/30JLW0bQR+pDzgBQndMZqu+ X-Received: by 10.14.175.131 with SMTP id z3mr2314762eel.65.1390467250469; Thu, 23 Jan 2014 00:54:10 -0800 (PST) Received: from phenom.ffwll.local (84-73-67-144.dclient.hispeed.ch. [84.73.67.144]) by mx.google.com with ESMTPSA id z42sm29240100eel.3.2014.01.23.00.54.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Jan 2014 00:54:09 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 09/19] drm/doc: Document drm_helper_resume_force_mode Date: Thu, 23 Jan 2014 09:52:34 +0100 Message-Id: <1390467164-951-10-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1390467164-951-1-git-send-email-daniel.vetter@ffwll.ch> References: <1390467164-951-1-git-send-email-daniel.vetter@ffwll.ch> Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Stumbled over while reviewing all occurences in the DRM doc talking about suspend/resume. Signed-off-by: Daniel Vetter --- Documentation/DocBook/drm.tmpl | 7 +++++-- drivers/gpu/drm/drm_crtc_helper.c | 9 +++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index 975a4d0a1d3f..e63a3aae3f14 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/drm.tmpl @@ -1151,8 +1151,11 @@ int max_width, max_height; This operation is called with the mode config lock held. - FIXME: How should set_config interact with DPMS? If the CRTC is - suspended, should it be resumed? + Note that the drm core has no notion of restoring the mode setting + state after resume, since all resume handling is in the full + responsibility of the driver. The common mode setting helper library + though provides a helper which can be used for this: + drm_helper_resume_force_mode. diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 01361aba033b..121ebeaa4cfd 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -972,6 +972,15 @@ int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb, } EXPORT_SYMBOL(drm_helper_mode_fill_fb_struct); +/** + * drm_helper_resume_force_mode - force-restore mode setting configuration + * @dev: drm_device which should be restored + * + * Drivers which use the mode setting helpers can use this function to + * force-restore the mode setting configuration e.g. on resume or when something + * else might have trampled over the hw state (like some overzealous old BIOSen + * tended to do). + */ int drm_helper_resume_force_mode(struct drm_device *dev) { struct drm_crtc *crtc;