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."),