From patchwork Sat Nov 25 19:16:21 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: 10074955 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 6EFFE602BC for ; Sat, 25 Nov 2017 19:16:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6135228ED2 for ; Sat, 25 Nov 2017 19:16:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 564E828F0E; Sat, 25 Nov 2017 19:16:40 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F366A28ED2 for ; Sat, 25 Nov 2017 19:16:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751286AbdKYTQj (ORCPT ); Sat, 25 Nov 2017 14:16:39 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36283 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750775AbdKYTQj (ORCPT ); Sat, 25 Nov 2017 14:16:39 -0500 Received: by mail-wm0-f67.google.com with SMTP id r68so28067242wmr.1 for ; Sat, 25 Nov 2017 11:16:38 -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=3na1xBPfp0cWPub3fHNsxi6X7sc2KRLANQ/x1PvgoTQ=; b=Gw+l5X8utDW4llWPiYv/Xusp+7bFRZwXmjYhhKCgzQln4DasJOZZtf9mslAg0PMhtI 95oRh9CNK08/n/owol8//zam43Rj1f2DsPyeJyU7tmE0A9uRk8+yyfMOSCHotkc+sgWd qSgYFUZdhhEJnNtn9htKfbDes0ZOJGNvgUL4hR/ctV03wQQvyT0jfd5JsiNWgPQtPKPx drElCX6nnP6/CrlKtwt3aHp+EXYbG1laPA61xuJzpQSezjZ/f6Gt58Xr9qHNDVtpFih/ GQU4oteSd4mk4WVYKdVASNVrS9akhR9mT7Y+1EQ5PzhFqLAK9H7tU10dw8ubSyRuzvej zlFg== 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=3na1xBPfp0cWPub3fHNsxi6X7sc2KRLANQ/x1PvgoTQ=; b=mNYMbuEfNbWk6J5x/7DSg6FZBMcayoxKwqq1PotXw63/gC0NzbaKGjzwCFi2N1kU0s GAvYQ58+an5CzgvVCATHVy+TLC77NqtEzNv2LMjV2HhyA29InURGYqLn7Coeyzj45g22 mG6XraGMvdeXFzshe7RGpReMcL6qU8j26FUTGGKNPIiQ/0wgj7lt1z2gCLNfMj5afYzj 1H5+L90xiZqOh6kjRPF8591MGSSCLGLPo8+i8jZa3jBEaEkdKgt0sgzbAHTCBbbFYAcm X7k1sjpUECNhrwGAFOCrSrYHx7AwGrXs6EuKfp5W1JZ4udBaHhPKf9OLdqPN25f68boI rhhQ== X-Gm-Message-State: AJaThX6471o6yxBGLxKykEXEHvlhduYQ2HEq9fT9GOr3r/glBmFr5K3k MYHCVrcACSHgWsZfaZtNzvk= X-Google-Smtp-Source: AGs4zMbjwb6gO0iC9BznQAU51gTacAHNmju+Uid+DEuXFckClyk7uHA6OSylLNx4X74UBiRGCLE+PQ== X-Received: by 10.28.158.212 with SMTP id h203mr13117482wme.157.1511637397978; Sat, 25 Nov 2017 11:16:37 -0800 (PST) Received: from localhost.localdomain.com ([2001:470:7a95:4242:2c1c:b9eb:f8cb:6ccb]) by smtp.gmail.com with ESMTPSA id 29sm22980796wrz.77.2017.11.25.11.16.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Nov 2017 11:16:37 -0800 (PST) From: Hans de Goede X-Google-Original-From: Hans de Goede To: Daniel Vetter , Jani Nikula , Sean Paul , Dave Airlie , Bartlomiej Zolnierkiewicz Cc: Hans de Goede , intel-gfx , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: [PATCH v6 6/7] efifb: Set info->fbcon_rotate_hint based on drm_get_panel_orientation_quirk Date: Sat, 25 Nov 2017 20:16:21 +0100 Message-Id: <20171125191622.16289-7-hdegoede@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171125191622.16289-1-hdegoede@redhat.com> References: <20171125191622.16289-1-hdegoede@redhat.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 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 d1bf9c2a78a7..88697ab1005b 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -16,6 +16,8 @@ #include #include