From patchwork Sat Nov 4 14:08:27 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: 10041609 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 F07F960384 for ; Sat, 4 Nov 2017 14:08:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E228629438 for ; Sat, 4 Nov 2017 14:08:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D70DA294C1; Sat, 4 Nov 2017 14:08: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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 7155229438 for ; Sat, 4 Nov 2017 14:08:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756734AbdKDOIp (ORCPT ); Sat, 4 Nov 2017 10:08:45 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:55291 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752089AbdKDOIp (ORCPT ); Sat, 4 Nov 2017 10:08:45 -0400 Received: by mail-wr0-f194.google.com with SMTP id o44so4746891wrf.11 for ; Sat, 04 Nov 2017 07:08:44 -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=U6G1+9C/CFvdJJ8gmZKSkGfDS9xLT2YWedy23cpqPXI=; b=c65olpOBa28xT0R0MoYg6xt8Bzr1qcAX5s4w3wYW33ZEl4qB/GZBa0YC9tyFQa5Jrs h418jNdfJnd+XfCMBBfR1MZXEhhqhcaJr8AKx8ukcKRNrVNRA9ETs61Y/K/Wn+blsqbe Ulc4Mq89kocJ3t63m5g3QGjk+CscJr0S5f7dhRLbt7vtCLnmPz3n9UyyfO8HieW9Dud2 Djw20aGFwVZHoL1eyqrLPtICQMMUxR7Q2wjmjPxjjHyrtkulhcto1gyL1cjFRHcxDYXb n8d4wG3fCe6W5kNP7mjvMbBrZWk1vRFcH9xcx8utIYsKktXsJH3Ec/0NaGMmKiBTQdfX eMVQ== 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=U6G1+9C/CFvdJJ8gmZKSkGfDS9xLT2YWedy23cpqPXI=; b=R1MyZJLgP67M61U65xT92AhzgDXZRmt0rzYfb69eF4YXDTpmDAPQEHxfXzPrh40cFQ EKru3VgTbW1Z7qxo/4tUXeZkyZ6jZDQJV6HMjVcexXrOILfdIFNLIfu3nwziGEXT6DKn Bz7upZ75o2Obt/KJGEld0rI3wpPEJbveR21a/TgP4Axc0/4g5agEc3guYHQmIZyNpRHY j/pghg1os1ECYnu6HJfvaFidC6tG0+hwgLN5cQWqXmCQUMg9QsZfWpZk+haJg/oWAHcK nFag7AfbAlNggBp6o9L81750FtIdIh4mAupzmasAdz8xOTsS57pMMiSsRy3aipB4SgVl +yqg== X-Gm-Message-State: AMCzsaXzYYvGgtyCWddcsxRiBgfCkrBFybUAPamwuexCDnhHVJsUxigw 7D+Fue0qAZ0wz3GIs/IRCFM= X-Google-Smtp-Source: ABhQp+RbsAmkotKYATqLP6TxXBk7UsSSusKAqk2f2dBHl4g6OTzNyiOHvXuXmWk/QIF+PrfYpQHy3Q== X-Received: by 10.223.185.77 with SMTP id b13mr9037680wrg.58.1509804523862; Sat, 04 Nov 2017 07:08:43 -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 p128sm4672674wmb.1.2017.11.04.07.08.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Nov 2017 07:08:43 -0700 (PDT) From: Hans de Goede X-Google-Original-From: Hans de Goede To: Daniel Vetter , Jani Nikula , Sean Paul , David Airlie , Bartlomiej Zolnierkiewicz Cc: Hans de Goede , Bastien Nocera , Daniel Drake , Carlo Caione , Robert McQueen , intel-gfx , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: [PATCH v5 6/7] efifb: Set info->fbcon_rotate_hint based on drm_get_panel_orientation_quirk Date: Sat, 4 Nov 2017 15:08:27 +0100 Message-Id: <20171104140828.32469-7-hdegoede@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171104140828.32469-1-hdegoede@redhat.com> References: <20171104140828.32469-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 3a010641f630..8c7f6aeee205 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -15,6 +15,8 @@ #include #include