From patchwork Sat Nov 25 19:35:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10076079 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 2C07A602BD for ; Mon, 27 Nov 2017 08:33:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 190C628DA0 for ; Mon, 27 Nov 2017 08:33:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C00328DA7; Mon, 27 Nov 2017 08:33:46 +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.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable 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 C551928DA0 for ; Mon, 27 Nov 2017 08:33:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 31CDC6E20C; Mon, 27 Nov 2017 08:33:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id C22406E166; Sat, 25 Nov 2017 19:36:07 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id r68so27637002wmr.3; Sat, 25 Nov 2017 11:36:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dS9KBnpSS2XgQHqUbcJDmU0sjY5sYt26uN88qvuvCxQ=; b=GhpqzIw9I1ZEhYvoNfyh0OW4L5EhjqoJwxPhbdmmeiiW3D9JPRdVtdtpV65cq0FHDt +cKWiTpqZBfuKqBmBrMYSm1AWym4fSwoPKfKFLAwxhqAmBHcJIbAVTkc8mro+4xEawpz 0hadIQ6AdMxeNVSmePmYozGoR7pWRDf8dXCAD90ClDkKjJfwxcieEyWf948NEsdg/YT+ rD0A4ONJpTEEckZf38Udl6jLYazFc5MQYrGLF+6JYyHcQsVy65ODHURvyQVS8AyWu4VZ AEy44nLO+XiwxPD5bBfTRSSUZLBUQaL7vBUX/aHM55/BmG76e6GZEQQhnutGL8oKEz8r UFvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dS9KBnpSS2XgQHqUbcJDmU0sjY5sYt26uN88qvuvCxQ=; b=G8creoeW5fsAIlEvTLW+IT4+YX2ZORVgHnRcxSIzKaJSMhWZk3RPQMRcqXFYVPSj8d WwR121WtbxZXQudclN58Pfxbhea5SqNnOgWNUJVrV2Yz4krBq3bLcWmO7xq2F75zv9No esTeE3Rhb/92U1q48gGhXU21xxbHSE0aCq/8hFSz1pCRHBTP0hDhezIoTyq453WUPJJV ks4xYPcW2yZtuIoGVhIYPFIk4kMC4USbPGI9LpA7vB3KoBrnhZYjaD2ZWQgzPya/dK1V 8iLU1lo+BjXvx2tMNxb1+Erj4kqtJdx1wk/fhv74E0B5dwbnI5G41Ds+B+2CNCG33HGx DF8g== X-Gm-Message-State: AJaThX4EkefBKJDzwUtMXq42D0mBdo2jc0ECleCgQ+EJNfEMPS/XN1L/ jrd299MzHMn4PdK0/tiF8Qo= X-Google-Smtp-Source: AGs4zMZ1z2Il3bZZi1wr25xW4uR4mHeMqgtjSedKogVSMc1rkeovRll08qC0gc2rO2+Ctyeq7e5U8Q== X-Received: by 10.28.133.12 with SMTP id h12mr14580366wmd.148.1511638566416; Sat, 25 Nov 2017 11:36:06 -0800 (PST) Received: from localhost.localdomain.com ([2001:470:7a95:4242:2c1c:b9eb:f8cb:6ccb]) by smtp.gmail.com with ESMTPSA id l142sm1835010wmb.43.2017.11.25.11.36.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Nov 2017 11:36:05 -0800 (PST) From: Hans de Goede X-Google-Original-From: Hans de Goede To: Daniel Vetter , Jani Nikula , Sean Paul , Dave Airlie , Bartlomiej Zolnierkiewicz Subject: [PATCH v7 6/7] efifb: Set info->fbcon_rotate_hint based on drm_get_panel_orientation_quirk Date: Sat, 25 Nov 2017 20:35:52 +0100 Message-Id: <20171125193553.23986-7-hdegoede@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171125193553.23986-1-hdegoede@redhat.com> References: <20171125193553.23986-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 27 Nov 2017 08:33:34 +0000 Cc: Hans de Goede , intel-gfx , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP On some hardware the LCD panel is not mounted upright in the casing, but rotated by 90 degrees. In this case we want the console to automatically be rotated to compensate. The drm subsys has a quirk table for this, use the drm_get_panel_orientation_quirk function to get the panel orientation and set info->fbcon_rotate_hint based on this, so that the fbcon console on top of efifb gets automatically rotated to compensate for the panel orientation. Signed-off-by: Hans de Goede --- Changes in v7: -Fix compile error from v6 --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/efifb.c | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 5e58f5ec0a28..c4a90c497839 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -772,6 +772,7 @@ config FB_VESA config FB_EFI bool "EFI-based Framebuffer Support" depends on (FB = y) && !IA64 && EFI + select DRM_PANEL_ORIENTATION_QUIRKS select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c index d1bf9c2a78a7..46a4484e3da7 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -16,6 +16,8 @@ #include #include