From patchwork Sun Sep 9 13:34:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10593361 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 878B3109C for ; Sun, 9 Sep 2018 13:35:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76E8828D58 for ; Sun, 9 Sep 2018 13:35:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B71B28D6C; Sun, 9 Sep 2018 13:35:09 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham 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 0CBA828D58 for ; Sun, 9 Sep 2018 13:35:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CBF3B6E0E3; Sun, 9 Sep 2018 13:35:06 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by gabe.freedesktop.org (Postfix) with ESMTPS id 510D06E012; Sun, 9 Sep 2018 13:35:05 +0000 (UTC) Received: by mail-wr1-x434.google.com with SMTP id u12-v6so19117514wrr.4; Sun, 09 Sep 2018 06:35:05 -0700 (PDT) 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=SwLvOsHg6V0Y7q8L4ZS5jGguKwxfv0SXuM5DccQB/TE=; b=tX5wcKhhkK9Rayt/wNt6M1I2wrZbqLSb1GCf5myAynatzsmpMgZzan7Ximpc7AGNiZ 6ecVKJQHiulL/+Wwr3YRBvK3Vg3lLtWAvMcyO7umNHEc4WydEvvibgsX3O/vZk+19fgq sFuP+03Rb0jo35bQVZzL6M6NrodjrI8/K3nFuJZhhAEfxsAEeQi3DNev40e8L4UTtt+h +XtrYa5+3/n/M81i8fnM6Xo1QaRl3DAdYj1UU2HZZmvsGyYJwMiQc9+9tLN+aeNj0EDY hZoVc1v+XD2jfn9irE5bBI/RfGUpHjVrycJZUgNScPtlsGwivI47Tzj24PoxuZmurHaI 1jmg== X-Gm-Message-State: APzg51C4ZNTw857cpEc4zPHxJnqHBFjgoVv4KWhaIey699WX/jO4GQFo UACQ7JKEiBNzqv0flW7DwHU= X-Google-Smtp-Source: ANB0VdZEDwiPn58DYk662kKXkMfJFNYzPqz/4nrMisBilXrSjECH5MCsIljFqQRSs7x1FD26OvH7oA== X-Received: by 2002:adf:f687:: with SMTP id v7-v6mr11764323wrp.201.1536500103948; Sun, 09 Sep 2018 06:35:03 -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 q135-v6sm22812845wmd.4.2018.09.09.06.35.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Sep 2018 06:35:03 -0700 (PDT) From: Hans de Goede X-Google-Original-From: Hans de Goede To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , Daniel Vetter Date: Sun, 9 Sep 2018 15:34:56 +0200 Message-Id: <20180909133457.10636-2-hdegoede@redhat.com> X-Mailer: git-send-email 2.19.0.rc0 In-Reply-To: <20180909133457.10636-1-hdegoede@redhat.com> References: <20180909133457.10636-1-hdegoede@redhat.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/2] drm/i915: Check for panel orientation quirks on eDP panels X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , intel-gfx , dri-devel@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP So far we have only been calling drm_connector_init_panel_orientation_property(), which checks for panel orientation quirks in the drm_panel_orientation_quirks.c file, for DSI panels as so far only devices with DSI panels have had panels which are not mounted up right. The new GPD win2 device uses a portrait screen in a landscape case, so now we've a device with an eDP panel which needs the panel-orientation property to let the fbcon code and userspace know that the image needs to be fixed-up. This commit makes intel_edp_init_connector() call drm_connector_init_panel_orientation_property() so that the property gets added. Reported-and-tested-by: russianneuromancer@ya.ru Signed-off-by: Hans de Goede Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/intel_dp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 436c22de33b6..4f0b3c8f3f8c 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -6490,6 +6490,10 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, intel_connector->panel.backlight.power = intel_edp_backlight_power; intel_panel_setup_backlight(connector, pipe); + if (fixed_mode) + drm_connector_init_panel_orientation_property( + connector, fixed_mode->hdisplay, fixed_mode->vdisplay); + return true; out_vdd_off: From patchwork Sun Sep 9 13:34:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10593363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 046AF109C for ; Sun, 9 Sep 2018 13:35:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E82D928D58 for ; Sun, 9 Sep 2018 13:35:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC7A028DA0; Sun, 9 Sep 2018 13:35:10 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham 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 9A16228D58 for ; Sun, 9 Sep 2018 13:35:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B147F6E1F5; Sun, 9 Sep 2018 13:35:09 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@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 16B2D6E012; Sun, 9 Sep 2018 13:35:06 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id 207-v6so18630531wme.5; Sun, 09 Sep 2018 06:35:06 -0700 (PDT) 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=rmgYu9pyCKtwoj7O9mNHimPdGiopZfNp0Y+r6IuR7qQ=; b=RtvSN569j7vbYSPHl/UWcaODH8PrasDG+Dxh+sjbHA/c+8AH3fFKgWK64wnXLLPp0F JkfteI84DEGFImuhHLGCQU5SuE3mkkgvbWymClLiav3cU0EGaj+kRjR078aRp5zggqKw OnODiIWSnwXxFRjxReV9pquvurE2IcetnAP0yoVljoxRjB0/k2cW3G8mAmgCExHGxFX6 WInhxTKOS4VvE2ykhq9Jv5tA2aMQ9WSWrrg90fsID88JCA3qzQNWLUjcojeL3ejRolIr HVt5hLf4Qcwhj9/i0byi/j3XvKXHiijH3CxR+3g0UuAGo0ohgwTFgxmi47xxPmaw+oZ7 UMyA== X-Gm-Message-State: APzg51Ca+ByowR2DFxB55koiRNYf7ICj8rxfKDYPE3PTBBntWZBCI6tS vvQtK4HmtYbXkdxD6SFGE/s= X-Google-Smtp-Source: ANB0VdaR8EJoqB1A11ByrahhGANZHC4ArFHjxylD+yZlyqFoJDcAh5IAOt+lhCvbME+PoyJNeXoDRQ== X-Received: by 2002:a1c:9692:: with SMTP id y140-v6mr10034446wmd.82.1536500104661; Sun, 09 Sep 2018 06:35:04 -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 q135-v6sm22812845wmd.4.2018.09.09.06.35.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Sep 2018 06:35:04 -0700 (PDT) From: Hans de Goede X-Google-Original-From: Hans de Goede To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , Daniel Vetter Date: Sun, 9 Sep 2018 15:34:57 +0200 Message-Id: <20180909133457.10636-3-hdegoede@redhat.com> X-Mailer: git-send-email 2.19.0.rc0 In-Reply-To: <20180909133457.10636-1-hdegoede@redhat.com> References: <20180909133457.10636-1-hdegoede@redhat.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/2] drm: panel-orientation-quirks: Add quirk for GPD win2 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , intel-gfx , dri-devel@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP GPD has done it again, make a nice device (good), use way too generic DMI strings (bad) and use a portrait screen rotated 90 degrees (ugly). Because of the too generic DMI strings this entry is also doing bios-date matching, so the gpd_win2 data struct may very well need to be updated with some extra bios-dates in the future. Reported-and-tested-by: russianneuromancer@ya.ru Signed-off-by: Hans de Goede Acked-by: Jani Nikula --- drivers/gpu/drm/drm_panel_orientation_quirks.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c index fe9c6c731e87..280a41d33081 100644 --- a/drivers/gpu/drm/drm_panel_orientation_quirks.c +++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c @@ -53,6 +53,14 @@ static const struct drm_dmi_panel_orientation_data gpd_win = { .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, }; +static const struct drm_dmi_panel_orientation_data gpd_win2 = { + .width = 720, + .height = 1280, + .bios_dates = (const char * const []){ + "12/07/2017", "05/24/2018", NULL }, + .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, +}; + static const struct drm_dmi_panel_orientation_data itworks_tw891 = { .width = 800, .height = 1280, @@ -94,6 +102,14 @@ static const struct dmi_system_id orientation_data[] = { DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"), }, .driver_data = (void *)&gpd_win, + }, { /* GPD Win 2 (too generic strings, also match on bios date) */ + .matches = { + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"), + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Default string"), + DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"), + }, + .driver_data = (void *)&gpd_win2, }, { /* I.T.Works TW891 */ .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),