From patchwork Mon Oct 23 07:14:24 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: 10022105 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 1064F603D7 for ; Mon, 23 Oct 2017 07:33:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0056E2823E for ; Mon, 23 Oct 2017 07:33:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7C6E286F7; Mon, 23 Oct 2017 07:33:43 +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 B18B62823E for ; Mon, 23 Oct 2017 07:33:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E190D6E316; Mon, 23 Oct 2017 07:33:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 92C1F6E2DF; Mon, 23 Oct 2017 07:14:41 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id m72so7424983wmc.0; Mon, 23 Oct 2017 00:14:41 -0700 (PDT) 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=dDxw4oM3hL+52jFVYq/bbXdEpuFkoDPYc8jS9Em3j5c=; b=Bj8VtEQMHOcvaJol5nloABhxdsUwmpSoBtHJbfzQpiN/ZGWqV9TFZD3+5NclT5FYyo ogx0w6PxuUJh3bdNDOaSk547GZYuSJgmzHkdvJdoBRDj27XoP57N83N8+eiSHY1Rhbqg pMKDZg3hYtW8DvHUJKp5CbCrXh5RzHG9CuVcfmAD3lRXgYtvSUYTf/P8DGjll7QwNJyj ZJrHk+blvUz3KkzbRrtXkOKGsPIRzJd3vwb909AnCtxYhqqx6517Xz3T8su/fQTwdztd wAukH7lk8a3ljMbRVQz5FEsg32h9tST4WAU7WnKrmCjlZ1kMfLpEZ+PGn/i5LF8P/dE5 uX/Q== 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=dDxw4oM3hL+52jFVYq/bbXdEpuFkoDPYc8jS9Em3j5c=; b=QUz/SvcwhYR9vkVq/z11TjBv7ViDGrlg6QP5RMUZqF6Q6f1uwD0ikX2tttcVpJpYfQ PDh9qFsv5humHkpXwh7mG86/Y4pGbRIK4TIPSwYJfLoHZ5XwCRdgPKSt1gIaNcnt2jh6 XsGWLOlMFM9m/CuqSpSeMI8L3K4npLkQz2JsCB7Y4DgTT/R8b94DUdmBYyWCITAGvUJv FRlpbUhF4xg9OXFvVAtrdIbgVBjvX4f0gaAguhYW9NZJgdcjgPa4aLYcKhOGPxB8Rn7h n+GDOSjcPa2+akq0UVuVria6KAIjD4VLGJMYEO8FLW022DHO67iPDmAOxr5sf0XnCF9b ohyQ== X-Gm-Message-State: AMCzsaXcX5xf0dA8QXnYMaDleIkFBeJr+LNtHEenpgfwa+Ng58YW189R vIBXlkEvPrSuCsEpOpoqAVw= X-Google-Smtp-Source: ABhQp+Q7giH36Kv9z05HV2Y7P5TMIvQUA/cnSFbwxxFAVxXlioANVvBFKWYENV7Cx7RfYtpIUwbrJQ== X-Received: by 10.28.90.87 with SMTP id o84mr4122226wmb.132.1508742880281; Mon, 23 Oct 2017 00:14:40 -0700 (PDT) Received: from shalem.localdomain.com (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id u52sm10426072wrb.68.2017.10.23.00.14.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Oct 2017 00:14:39 -0700 (PDT) From: Hans de Goede X-Google-Original-From: Hans de Goede To: Daniel Vetter , Jani Nikula , Sean Paul , David Airlie , Bartlomiej Zolnierkiewicz Subject: [PATCH v3 6/7] efifb: Set info->fbcon_rotate_hint based on drm_get_panel_orientation_quirk Date: Mon, 23 Oct 2017 09:14:24 +0200 Message-Id: <20171023071425.5090-7-hdegoede@redhat.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171023071425.5090-1-hdegoede@redhat.com> References: <20171023071425.5090-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 23 Oct 2017 07:33:04 +0000 Cc: linux-fbdev@vger.kernel.org, intel-gfx , dri-devel@lists.freedesktop.org, Daniel Drake , Hans de Goede , Bastien Nocera 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 --- 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 3a010641f630..8c7f6aeee205 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -15,6 +15,8 @@ #include #include