Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2818684rwb; Mon, 15 Aug 2022 11:59:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR5TFmxkM6DT/7eOt4s8MvX+AT2+E8TUyUvxKm5wr9ERgXVAhe34Mwuw3uoFi++4z/FAM8Dz X-Received: by 2002:a05:6402:540c:b0:434:d965:f8a with SMTP id ev12-20020a056402540c00b00434d9650f8amr15931473edb.30.1660589998157; Mon, 15 Aug 2022 11:59:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660589998; cv=none; d=google.com; s=arc-20160816; b=zrBsUwINKHdTu5jKA81fI/KfORnYeqEd0m0fXGZxNfHVGovjbVsFWx0FKMGhl1I9h3 +0hlYekUaVrHFR9d481QgQVxykw/UiWKpF/KKxQS2IpAYc+ONPpgY45mKkQWmWz8cEqu CJRBMFtvuNrLQPMI4k8cMm1PDKxqPjpioxZz40agRDQg9f6+Qq7pIcxC8SUwNVuZXJEi WvQoZaWOCB5s5oR5DBzO7f7eZJMz6RwEv3IlCCZSnRJzC91MDKRWgiyZY5nXVzoCWdwu tcDc9hgBM519cA6Hr3udEiJNO81nvl2Pa2b3jIHyjFSIfHsiMQUAdnQYwFCFMwnV7PkZ BnpA== 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=pDFEFwZ5XTgPz1l6Rh0ji3pftxEaf96OLU0Fp75IJaLJ3WfSM3avXyjCRdwg/G0Aan sNcjspTsDrWFOZARp5kTOumDf9t9DBJ5TSJjUYNy03vrZfUBS/aOOGC5fjMRENwpj9nK CvFRb36r/gsyjiVaUp7mkAkobwMwcp3O5yoS7zJXnixmxCEQLyRpl2JQYX5rpqvLKNnq PHeWgerKkVj6OLHcQYo+ds0ET8dS91Du/ffnfe8VTM1SHSnZQRFKNmfAwQx+w5cR4/Ss 2Wu9cx2e4a7gfZxPpgbGnJ0ICJ+Ody2carYOLLZ7IzwZEyOkL5n4ySvf3hrF/rnGwiX5 8GiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wb9EIrUc; 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 dm20-20020a05640222d400b0043d727cea7fsi7273004edb.341.2022.08.15.11.59.18; Mon, 15 Aug 2022 11:59:58 -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=wb9EIrUc; 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 S244572AbiHOSyr (ORCPT + 99 others); Mon, 15 Aug 2022 14:54:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244654AbiHOSvj (ORCPT ); Mon, 15 Aug 2022 14:51:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A81E45F6E; Mon, 15 Aug 2022 11:29:28 -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 AB71CB81087; Mon, 15 Aug 2022 18:29:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7D7AC433D6; Mon, 15 Aug 2022 18:29:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588165; bh=ZCTlZ6oiSDxVQ1XvejSCzZ84C+U5CBdJqQG1WcctKyc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wb9EIrUc9tWysIQkS72pl2LDoob+LSwXiMk1C6PFopfkicuhte7k53OdSvXO86kzg PhW7pFo1J+kiEQSBnaYETYU3yls9tK/6MAuKiRvccLApmPL4e+DM+JDYAGa0yroI7p YnD+qpf8+Ew+xTd+o71jBBHDYZ1MRQwB+N+f2HlE= 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.15 315/779] drm/mediatek: dpi: Only enable dpi after the bridge is enabled Date: Mon, 15 Aug 2022 19:59:19 +0200 Message-Id: <20220815180350.750853416@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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