Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp255320ybd; Tue, 25 Jun 2019 20:51:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwt13YO3DTNj/8s4DnLYimNJmgDXPgSlzTFIdfaCpYPXiXSsAOJO5lNXtAdFq88FNfCO/fA X-Received: by 2002:a17:90a:d587:: with SMTP id v7mr1898312pju.28.1561521072651; Tue, 25 Jun 2019 20:51:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561521072; cv=none; d=google.com; s=arc-20160816; b=0ziYWlYdPRrpcEU17b62+x0qPaUgwDUdKW00yHT0eJcd4AB3Bt6iXb74DRTBhL+1Q6 xN28sfm55uyGTjQr3oZ8Cr+LSYjsAuguzLRzBsmKnKAKj8eXm/U2u+kUQz7snhQ/GfeH 9YAtAYdeAFd8vEdLXFsWxSRMhv7tNSFIs0+0PLxZmFdyCs8Kn525+0R4AuhmKcofMJOM W3PWElhOBbJ09ACWMD0JF0/mDb8oT+U9rwRA6xUcUaZ35/FuPPDiv1L9Vi+uXXQwX0MY HibZizMHU5OVlXNr7a4TWPMWuNJbgygT+fKhlTNJ9yMkarrL5SFLPlts263/8GsCHkEt jOeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IGl5ImmSfrqn5cNF5SVcvGo19A4rE4CFRLbQUVaYlas=; b=OTmy3OIj0NTbo4cnt1XTSEncpIb+0s7OmKKJ+Y2X2Horla8s/+PY8PxiNtyPd6avoI fPJQh0H3Yv58XXvtqikHyIXAP5bGVlUnnYFOMfjkrgcw4EzLNjeoSpa63YFWdF1atDmY MOGfoM/v+w8sDRD9OC8sTxb+sz7lM+nCBwVw09nN14t6LuixLaOuSFe4zhlTPVaUo1V5 Ip0tgU34oDpVQO8TSMa6rAOQx7ASecN6vYnzNbheoy/1RyjcGjeuJWbP2xu3uxgXpupr nWBLO/NJqx4xB5NjDr2PfIo4+Ypju50DSEhnAtTc0di2RWtPu+N/f/Euq76reO/zt4CQ wj4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xn+cjEmY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gb4si1999040plb.429.2019.06.25.20.50.56; Tue, 25 Jun 2019 20:51:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xn+cjEmY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727241AbfFZDnF (ORCPT + 99 others); Tue, 25 Jun 2019 23:43:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:54050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727188AbfFZDnA (ORCPT ); Tue, 25 Jun 2019 23:43:00 -0400 Received: from sasha-vm.mshome.net (mobile-107-77-172-74.mobile.att.net [107.77.172.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E2D77208CB; Wed, 26 Jun 2019 03:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520579; bh=DAH6MgEyx7njo0iZ7bmJhEsqVy8xFE4LtQ6zVjlE2Ro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xn+cjEmYSjXQsfvdSEqVv/dz2aprjPLjOZ+tGvD0QzpGm/jfCWdcegyQ/ZTcG5ynZ Vo9kT6IflIL8isyO927yM/a9EijkXR3ag37AqDwiMchT1a5GwWqaCdC0xOK1gvrHI3 JjVQoC3glPJR9dQAW8yaMnOfdsl5/p/p45OT53s8= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans de Goede , Jurgen Kramer , Maxime Ripard , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.1 36/51] drm: panel-orientation-quirks: Add quirk for GPD pocket2 Date: Tue, 25 Jun 2019 23:40:52 -0400 Message-Id: <20190626034117.23247-36-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626034117.23247-1-sashal@kernel.org> References: <20190626034117.23247-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ Upstream commit 15abc7110a77555d3bf72aaef46d1557db0a4ac5 ] 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_pocket2 data struct may very well need to be updated with some extra bios-dates in the future. Changes in v2: -Add one more known BIOS date to the list of BIOS dates Cc: Jurgen Kramer Reported-by: Jurgen Kramer Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20190524125759.14131-1-hdegoede@redhat.com (cherry picked from commit 6dab9102dd7b144e5723915438e0d6c473018cd0) Signed-off-by: Sasha Levin --- 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 52e445bb1aa5..019f148d5a78 100644 --- a/drivers/gpu/drm/drm_panel_orientation_quirks.c +++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c @@ -50,6 +50,14 @@ static const struct drm_dmi_panel_orientation_data gpd_pocket = { .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, }; +static const struct drm_dmi_panel_orientation_data gpd_pocket2 = { + .width = 1200, + .height = 1920, + .bios_dates = (const char * const []){ "06/28/2018", "08/28/2018", + "12/07/2018", NULL }, + .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, +}; + static const struct drm_dmi_panel_orientation_data gpd_win = { .width = 720, .height = 1280, @@ -106,6 +114,14 @@ static const struct dmi_system_id orientation_data[] = { DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"), }, .driver_data = (void *)&gpd_pocket, + }, { /* GPD Pocket 2 (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_pocket2, }, { /* GPD Win (same note on DMI match as GPD Pocket) */ .matches = { DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), -- 2.20.1