From patchwork Wed Jul 26 20:56:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 9865873 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BC545602B1 for ; Wed, 26 Jul 2017 20:56:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AED6528628 for ; Wed, 26 Jul 2017 20:56:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A224528733; Wed, 26 Jul 2017 20:56:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3A61C28628 for ; Wed, 26 Jul 2017 20:56:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C0F5C6E8DA; Wed, 26 Jul 2017 20:56:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 34F256E8DE for ; Wed, 26 Jul 2017 20:56:46 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 75834AE99; Wed, 26 Jul 2017 20:56:44 +0000 (UTC) From: Takashi Iwai To: Daniel Vetter Subject: [PATCH 2/5] drm/bochs: Return an error from connector dpms callback Date: Wed, 26 Jul 2017 22:56:33 +0200 Message-Id: <20170726205636.19144-3-tiwai@suse.de> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170726205636.19144-1-tiwai@suse.de> References: <20170726205636.19144-1-tiwai@suse.de> Cc: Alexander Graf , dri-devel@lists.freedesktop.org, Gerd Hoffmann X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The bochs drm driver doesn't treat with DPMS, so we should return an error from the connector dpms callback so that the fbcon can fall back to the generic blank mode. Signed-off-by: Takashi Iwai --- drivers/gpu/drm/bochs/bochs_kms.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 6a91e62da2f4..a60d1a05950f 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -217,6 +217,13 @@ bochs_connector_best_encoder(struct drm_connector *connector) return NULL; } +static int bochs_connector_dpms(struct drm_connector *connector, int mode) +{ + drm_helper_connector_dpms(connector, mode); + /* FIXME: return error to make fbcon generic blank working */ + return -EINVAL; +} + static const struct drm_connector_helper_funcs bochs_connector_connector_helper_funcs = { .get_modes = bochs_connector_get_modes, .mode_valid = bochs_connector_mode_valid, @@ -224,7 +231,7 @@ static const struct drm_connector_helper_funcs bochs_connector_connector_helper_ }; static const struct drm_connector_funcs bochs_connector_connector_funcs = { - .dpms = drm_helper_connector_dpms, + .dpms = bochs_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, };