Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2929830rwb; Mon, 15 Aug 2022 14:15:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR4bVaY7leO13asjBOm9KYGmUkEiPVQAXvTkc+HUBKd6ilXmkLBWmvdPwRyESHK37Wh/yQwQ X-Received: by 2002:a17:907:72d1:b0:730:a0c4:2aaa with SMTP id du17-20020a17090772d100b00730a0c42aaamr11170186ejc.560.1660598137968; Mon, 15 Aug 2022 14:15:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660598137; cv=none; d=google.com; s=arc-20160816; b=Z6r825kHWCJjl0lz+yOJP8MA3vOFpmzD6Iy28EwozIZnyNm0l9ul1b68IAj5p5VXcj 2JDwkP6/iU8RH51cj+lCavb1+l+cUppXD5jGWJFu4G9UvykGQXAuatc9XSot+GPUw8GN F9UV2rxomjreaH7tJiL7AxOWkMbkVuDMfD7iJ0JPd2GDzy1idWUJhfB4Ml1g39gMu7E3 OzHwLIshZxiAlP9CPD8dQ3JkAgHXht8KQK4SnZYfulnOXNBZLeyKJIC9xdD/mUGG9yam RHHHKXB/EUhDzLckGxXsHvLKzqa0ktrtRGT7P+w7W2v2ccMPIbA0W61LLoW/TQ6/mGS3 RjIA== 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=mYukoJh6Qx6w9teUa80UvmfIa0pftqMBr2nQHhwZsmk=; b=gVuTXAcQH0w9a1xVc4pqW1rwwX3kItlbEH0V1lhGg2a7mKoQX/LdFHW1GkceKQjV4Z 3P86o4XfzdiQUDYJ8RkuBZGK4zAzdClXOrqERmeCXYSs1aXeLfFV9uiMQGhrec9xiIkj NwFt4V6wOvYu3WKhZ9kfpQwYAKuHNPajqOPyDvCVjqzjcPmvpgkqw15etsIV1vC43bXn LD/ovxMNT+hLblYpyEBHAnbX0uzW8Pkq8SXw+KsxfFOiInNVFhZAyM64DhUJjgm6KGRR 2qzDFqnreEJ2upnUWKxaB58dm8dDVS92TjXmyUtA6ML7aMo7SSndoPVTIEZ/DdHSZvVW x6DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jBqQ367e; 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 dt18-20020a170907729200b00722e82edf14si9569202ejc.14.2022.08.15.14.15.09; Mon, 15 Aug 2022 14:15:37 -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=jBqQ367e; 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 S243387AbiHOVKj (ORCPT + 99 others); Mon, 15 Aug 2022 17:10:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346042AbiHOVGO (ORCPT ); Mon, 15 Aug 2022 17:06:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 204122A739; Mon, 15 Aug 2022 12:15:18 -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 ams.source.kernel.org (Postfix) with ESMTPS id 5C2CBB81113; Mon, 15 Aug 2022 19:15:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91619C433C1; Mon, 15 Aug 2022 19:15:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590915; bh=ZCTlZ6oiSDxVQ1XvejSCzZ84C+U5CBdJqQG1WcctKyc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jBqQ367e6eXPtbCuAj9O8XrXmpMKWi+BHibTnRiwWfETpZomcKyB3D1w5+Cli5VVn ylpTviK0jiUTZw4F8uv9kPKrvdg5EiIJo8azEgStjzmCVO+j3LqN7jy1Zl93L6gLFR 8NJMdIZOXxDNpbIVsouRxGn2ZwlpASrOhZgW8Yuk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guillaume Ranquet , Bo-Chen Chen , AngeloGioacchino Del Regno , Chun-Kuang Hu , Sasha Levin Subject: [PATCH 5.18 0412/1095] drm/mediatek: dpi: Only enable dpi after the bridge is enabled Date: Mon, 15 Aug 2022 19:56:51 +0200 Message-Id: <20220815180446.738887855@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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.1 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,T_SCC_BODY_TEXT_LINE 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: Guillaume Ranquet [ Upstream commit aed61ef6beb911cc043af0f2f291167663995065 ] Enabling the dpi too early causes glitches on screen. Move the call to mtk_dpi_enable() at the end of the bridge_enable callback to ensure everything is setup properly before enabling dpi. Fixes: 9e629c17aa8d ("drm/mediatek: Add DPI sub driver") Signed-off-by: Guillaume Ranquet Signed-off-by: Bo-Chen Chen Tested-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-16-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu Signed-off-by: Sasha Levin --- drivers/gpu/drm/mediatek/mtk_dpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 675e2e4072df..41c783349321 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -417,7 +417,6 @@ static int mtk_dpi_power_on(struct mtk_dpi *dpi) if (dpi->pinctrl && dpi->pins_dpi) pinctrl_select_state(dpi->pinctrl, dpi->pins_dpi); - mtk_dpi_enable(dpi); return 0; err_pixel: @@ -639,6 +638,7 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge) mtk_dpi_power_on(dpi); mtk_dpi_set_display_mode(dpi, &dpi->mode); + mtk_dpi_enable(dpi); } static enum drm_mode_status -- 2.35.1