From patchwork Sat Nov 25 17:33:40 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: 10074903 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 3D272602BC for ; Sat, 25 Nov 2017 17:34:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A1D229011 for ; Sat, 25 Nov 2017 17:34:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F17929016; Sat, 25 Nov 2017 17:34:02 +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 B973729011 for ; Sat, 25 Nov 2017 17:34:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751621AbdKYReB (ORCPT ); Sat, 25 Nov 2017 12:34:01 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:46157 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751854AbdKYReA (ORCPT ); Sat, 25 Nov 2017 12:34:00 -0500 Received: by mail-wr0-f194.google.com with SMTP id r2so16327327wra.13 for ; Sat, 25 Nov 2017 09:34:00 -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=0Evmb45wv9xfzKykrehHK6tWLRf3AwOrUQ2/wmp1t4s=; b=c+epe2S/rh/yP2gA9NscPgMyxPzR6ne0GdtINs6kM2pParX5RokuQZVh1hEoo9w0k5 5OVXRmyBA6vDI+PV4I56h7mzUsvFMh6z9RlFNh2gCVxlKb3zXj43+wBUQGn9po2EpVa4 YE4wtn2QScNK+qYt5otfy45laNfEABFPhmWqMBU1jmmGj+RwB5O7lx2tQDd3FF21dxtH VAXY4MJI6abNcQhUaVmMynIrVkyZGcH+SIlx7ctpBQox1mEjZdJe+Ofx7S40U5GxO/Gv KZ5dy49C/tAnfbRRUd5+MrMkyEb3Y4IIvb5eDbqlaWw/XjWxrVwco59LvajCSmyDXpBk Augg== 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=0Evmb45wv9xfzKykrehHK6tWLRf3AwOrUQ2/wmp1t4s=; b=F4frKRGvG7JgdKyMiMh5j9sA5zFw1Z7P4czPfRikM6WVR85lJ5jrboVY+yGW5OyGMh kWbVhEze42ECBY/uGnAAMvYKzsVIlgduSWR1IpVkR7O7RlS6PltGc8KBPlMFO2+LzaHk UBR3PR9es/i4ziqd1/N1XLtXSGA6tOiAxawzPm2eNWRAP8cHDYpokIJC207LN4RLovIE FyYzWmym/k7YzmroEM1w/H5bIJUcgdcokTsXxHp9Xy1ykHx6Ub/d8I081rErxAXyj+it o1T7tydFwc4IDi3l0qF3oj0uAe+lNloUQpgD1MhlV/+Z+r3NHCxfqGiN7Y13+7fgelaL up9A== X-Gm-Message-State: AJaThX4pRPQkBeGrsnHFJrga1d6NlrS2/UdA+LEVnvB04BRN1Wj9mUbB YWeierAZng2+KafRolWAuk4= X-Google-Smtp-Source: AGs4zMYTFgBKcb5yG8qrqfaGCJaZIGdVsJf/FiY+48A63miKBjoTVSoUs6gWivw7Ew1DIn0DRTo6xg== X-Received: by 10.223.160.230 with SMTP id n35mr10501717wrn.116.1511631239622; Sat, 25 Nov 2017 09:33:59 -0800 (PST) Received: from localhost.localdomain.com ([2001:470:7a95:4242:2c1c:b9eb:f8cb:6ccb]) by smtp.gmail.com with ESMTPSA id o135sm8439658wmg.1.2017.11.25.09.33.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Nov 2017 09:33:58 -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 18:33:40 +0100 Message-Id: <20171125173341.14162-7-hdegoede@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171125173341.14162-1-hdegoede@redhat.com> References: <20171125173341.14162-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 2f615b7f1c9f..2566cfbdebfb 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