Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp810207rwb; Mon, 26 Sep 2022 06:13:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6HDSnJg0wAsveTNTMe5AnrHHfpOe6wgO+xtERUPl4IK+aI2dGpmmrjZ2uOoMf3N4ejHRh/ X-Received: by 2002:aa7:d0cf:0:b0:456:f41e:9aa with SMTP id u15-20020aa7d0cf000000b00456f41e09aamr12081540edo.422.1664197997484; Mon, 26 Sep 2022 06:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664197997; cv=none; d=google.com; s=arc-20160816; b=T4a0A+embrZC0daIW/v6HAbvr46k2Z866tyyHslWgyyEt6Eibp8Gbrkf8n/EGprxTJ xjE0fSWDvlE3WQNbqsNuay33i9Hka1IhaAb2wWlcFddqdSRpoYiCgR2g5EK03PzG5fAr qNSyI1Vu6IYIRzYgnx/x7LWnu/geengLgyZi6B91jXigYWrtMeaG0GTv3LEkw2ZstM2G w8bcm5Lj8/WELcTjeFNXA4Hzth2Bm9jXJLu/MHVLoZotDD9VdjpZ+tt8uyvGbFdNn72K cv960AiBwf7x/8j3smLdjNelsDZo24LriU1oJajP3Z9NyBT7jpb7gK9N1uz70xG5UNsK fT7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ERRHCqj5ZPEOnhkLrz2dh9XegDO2fygm/1ibgDdhh50=; b=yXxTY29RYTiJL81UteLAfr+RoZQxGPF/tMbQ6eraITxi+ZeGF6Yu1NabQobo6LGJ6T kSb3UfWsg3IKvW1wWDlOEy5ClUD5seTtl+IJpQ7Ql3E3JmVuq1iGJ6MTxUvELLEmz+pp ucvZ9l+f2SaHTGpJiXjxJpFzM/x7jFPQznbmju4JZx4kHw0dUqhoGMVIh70WDRBlXgjk vIEzaP8AY0iRcocnkM/zcTRzt1uhFyVk9XXsLBWj/Bm2yB2Mb4SnbOhp5Xo/l8ZhAm6Q Q5LaR8a8zwsP0RYyxEom5qjS38dtejAmLEILc4RZ0qhDHJzMQ/rEg2RwgnB3sRRk6xXX l45Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EEZsPFgJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ed10-20020a056402294a00b00456f8d9b2cdsi6105135edb.452.2022.09.26.06.12.34; Mon, 26 Sep 2022 06:13:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EEZsPFgJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238319AbiIZLk2 (ORCPT + 99 others); Mon, 26 Sep 2022 07:40:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238389AbiIZLjL (ORCPT ); Mon, 26 Sep 2022 07:39:11 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E5162AC5; Mon, 26 Sep 2022 03:44:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id DE6C6CE1102; Mon, 26 Sep 2022 10:43:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF99BC433D6; Mon, 26 Sep 2022 10:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664188980; bh=Aom8kWSJgu4UOgAA9Ykj7bRPrOyf+X8yQTwtsQacFMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EEZsPFgJ4rVj6LNOU6Zqw0j5Rq3MAP0Cs+MOkn5h8TagLLEd0NnFlae9x15PMEEc/ JbE18ogcXWPgUxBIukwuCKh8hkEl2qOZ0AYAs4RO90TtrGDIEzXWh044BSlsQfUoj6 /cQjebeVkRq+zAbPALWFoZGwv00pSoVuXxCchsoU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jani Nikula , Stanislav Lisovskiy , Rodrigo Vivi , Sasha Levin Subject: [PATCH 5.19 007/207] drm/i915/dsi: fix dual-link DSI backlight and CABC ports for display 11+ Date: Mon, 26 Sep 2022 12:09:56 +0200 Message-Id: <20220926100806.807881703@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100806.522017616@linuxfoundation.org> References: <20220926100806.522017616@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jani Nikula [ Upstream commit 13393f65b77445d8b0f99c7b605cc9ccc936586f ] The VBT dual-link DSI backlight and CABC still use ports A and C, both in Bspec and code, while display 11+ DSI only supports ports A and B. Assume port C actually means port B for display 11+ when parsing VBT. Bspec: 20154 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6476 Cc: stable@vger.kernel.org Signed-off-by: Jani Nikula Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/8c462718bcc7b36a83e09d0a5eef058b6bc8b1a2.1660664162.git.jani.nikula@intel.com (cherry picked from commit ab55165d73a444606af1530cd0d6448b04370f68) Signed-off-by: Rodrigo Vivi Signed-off-by: Sasha Levin --- drivers/gpu/drm/i915/display/intel_bios.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index d5d20a44f373..b5de61fe9cc6 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c +++ b/drivers/gpu/drm/i915/display/intel_bios.c @@ -1473,6 +1473,8 @@ static void parse_dsi_backlight_ports(struct drm_i915_private *i915, struct intel_panel *panel, enum port port) { + enum port port_bc = DISPLAY_VER(i915) >= 11 ? PORT_B : PORT_C; + if (!panel->vbt.dsi.config->dual_link || i915->vbt.version < 197) { panel->vbt.dsi.bl_ports = BIT(port); if (panel->vbt.dsi.config->cabc_supported) @@ -1486,11 +1488,11 @@ static void parse_dsi_backlight_ports(struct drm_i915_private *i915, panel->vbt.dsi.bl_ports = BIT(PORT_A); break; case DL_DCS_PORT_C: - panel->vbt.dsi.bl_ports = BIT(PORT_C); + panel->vbt.dsi.bl_ports = BIT(port_bc); break; default: case DL_DCS_PORT_A_AND_C: - panel->vbt.dsi.bl_ports = BIT(PORT_A) | BIT(PORT_C); + panel->vbt.dsi.bl_ports = BIT(PORT_A) | BIT(port_bc); break; } @@ -1502,12 +1504,12 @@ static void parse_dsi_backlight_ports(struct drm_i915_private *i915, panel->vbt.dsi.cabc_ports = BIT(PORT_A); break; case DL_DCS_PORT_C: - panel->vbt.dsi.cabc_ports = BIT(PORT_C); + panel->vbt.dsi.cabc_ports = BIT(port_bc); break; default: case DL_DCS_PORT_A_AND_C: panel->vbt.dsi.cabc_ports = - BIT(PORT_A) | BIT(PORT_C); + BIT(PORT_A) | BIT(port_bc); break; } } -- 2.35.1