Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7419247rwp; Tue, 18 Jul 2023 15:16:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlGaDMbVVON1C+Q5Nc692Uao7z5EWkPNM6u0SVcuXhZF4OAzUZI4FJa7Iw9PzlvhfNkdQ/yn X-Received: by 2002:a17:906:6495:b0:98e:933:2909 with SMTP id e21-20020a170906649500b0098e09332909mr967465ejm.22.1689718609027; Tue, 18 Jul 2023 15:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689718609; cv=none; d=google.com; s=arc-20160816; b=xyMBZ8PAisTxfmTaWKvBuaaQY/a6hi7IVAf/7cqv7UnpaHQ9jsLs1S4xVkvGhnCfyn QyT5nCRS7OGRUZ5T0ppWd9rbH7CRh2WPaCCbP6BJgbhFyeVtAI3QIPv85MiUaI8cPEVq RMeKnjxn6XBgXLuN/EMgxybfAX0MQgl/gYC2fEPAKNyqqFBViFqAzfHXwxNr5My5e15q bEp4VcuD/V2q0zppWPl1iAxuQGp99DaChcdtUxFmhN5fUDSpTAobVis9J4M2L7pdhFKZ ytzLcWnr2JmHPjNP3CKIJT5rxXyrvCeFMO/iQXS80INr+/lZ72SOvT2PfD3zS4bvQPHW ZgkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=nGhTE283vqSMbHE6NrAjPBOLH8wxgNh+ZZrxUXaoOpA=; fh=oY00sunCPn0CdXT3Tt4FSLPrMyu3g2f94sRKjh2JWKM=; b=SQ04gcb7Im4lrQM1bRpk06PxeMQXn4Pxg9bQRM2sj7Qpgg922BR+X7ZAm26g2HQX1e jOHQSvHQAmOnd71vDH2VfiHzBKyJpHDPx+mw8zrIVr5azTP9zK1DQmJbsuflZVMelPtr vu+xy/gWhdWg2/xR3a4NDAmpCAN+zeHiG2w9Ul6FVlDQK5tsMfLOrtfUrCeCmf3pOBva qgWOU7q6w41hXWiK3xLVXaD0kQibnP8LATIo+xoTfiTzHgRcfE6nfmUugfUI5mjnfvXM OumNCSFEegR0mCbIIosnQpaeBzcsQmAt/FNudGQYWD/f2l2mKzX0B2djcB8CyVVfGZ3k sYVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ptwRQKkV; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u8-20020a170906408800b0099a1fb56245si188504ejj.432.2023.07.18.15.16.22; Tue, 18 Jul 2023 15:16:49 -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=@linaro.org header.s=google header.b=ptwRQKkV; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230502AbjGRWAW (ORCPT + 99 others); Tue, 18 Jul 2023 18:00:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230506AbjGRWAV (ORCPT ); Tue, 18 Jul 2023 18:00:21 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F69A1995 for ; Tue, 18 Jul 2023 15:00:19 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4fb9ae4cef6so10235791e87.3 for ; Tue, 18 Jul 2023 15:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689717617; x=1690322417; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=nGhTE283vqSMbHE6NrAjPBOLH8wxgNh+ZZrxUXaoOpA=; b=ptwRQKkVwDdm7SgUSdqf5CGN3sboG/MAmMkkl8n6rXlRERI/19F7r0DmslJIxUZegm rjG5fC03XibcUo7oTKTvN96fEyYL3qgzz5iVCgXR1yoDk8a01ZC2F4GRIYgn5I/azdBB 3zc15HqhLpqUx6XyH8Y704XRM6SxQObwURYueJP5DYM3FJkX/fqoKHy9FsqsEavtBxSl yVkZkWA6MgAMkT9RY7Ea/zE8svFgtm3dIOKFp9FOA5IqOCyf1Y8Dhq5s1iHvDkbxsPe1 FZAnI/bN8h6RZ5iyI5gH8G2nAvgkiRwBiCIVpWH+bsyiCJ1fbi8vKo3HEf93cuP4koO3 fP9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689717617; x=1690322417; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nGhTE283vqSMbHE6NrAjPBOLH8wxgNh+ZZrxUXaoOpA=; b=W9FGHcEKCYbzu+gS9UGh+VScvdWUYMLoZ/WxCP8dn597c2HH79wOb5An9B6LD35rSu GkDUCTNRUcQvhoqYogq5oFboFJ9dGH4yTOjTz3+PutbI56QNGbT5bqyUHPCQTx3INBYF 1ge39nCpmPLK9qtsmzw2DMZgRfvxK5y5hlfbNDSk/+2Rtw89aYeCLw1z2rtEclgGMwEp wvZq0UUb/r+7RW+dNhf0I0BCpmmz2nnjxdClEtQ6dxTKhPuO7uQCb0K+PGh6+nQ+7QTS Ix/x4/9n7z966/hCbjfKUU06l9cDbM4B+d85AjawHVuLLbyFwe8GoehHO40++/wMqhy9 ArwQ== X-Gm-Message-State: ABy/qLZKvYggd1yPCidZeNdL0HA6TkLGFqWcBiPsb/Ml+pZ2REcCLiO8 9suJgkIMWNZdmWT7ubzmBQ6Avg== X-Received: by 2002:a05:6512:234a:b0:4fb:8b2a:5e09 with SMTP id p10-20020a056512234a00b004fb8b2a5e09mr12140549lfu.43.1689717617303; Tue, 18 Jul 2023 15:00:17 -0700 (PDT) Received: from ?IPV6:2001:14ba:a0db:1f00::8a5? (dzdqv0yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::8a5]) by smtp.gmail.com with ESMTPSA id b14-20020ac25e8e000000b004fb745fd232sm633614lfq.30.2023.07.18.15.00.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jul 2023 15:00:16 -0700 (PDT) Message-ID: Date: Wed, 19 Jul 2023 01:00:16 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v2] drm/msm/dsi: Enable DATABUS_WIDEN for DSI command mode Content-Language: en-GB To: Jessica Zhang Cc: freedreno@lists.freedesktop.org, quic_abhinavk@quicinc.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Marijn Suijten , Sean Paul References: <20230713-add-widebus-support-v2-1-ad0added17b6@quicinc.com> <91bc6348-2030-85dd-1492-1609b392793f@linaro.org> <05996344-0e43-7f37-c99a-42c04f91dc83@quicinc.com> <19ff3766-a73e-761d-8965-015817fa9c0c@quicinc.com> <637e4979-cadc-2167-a14f-25363c9da990@linaro.org> <2804b7c7-0ed2-6490-3316-7a38eb1262f8@quicinc.com> From: Dmitry Baryshkov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable 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 On 18/07/2023 23:44, Jessica Zhang wrote: > > > On 7/17/2023 11:04 PM, Dmitry Baryshkov wrote: >> On 18/07/2023 03:30, Jessica Zhang wrote: >>> >>> >>> In addition, *_is_widebus_enabled() would only work under the >>> assumption that DSC (if supported) will always be enabled during >>> bootup for DSI. If there ends up being support for a panel that >>> allows for DSC to be enabled on the fly after bootup, the proposed >>> *_is_widebus_enabled() check would break since the assumption that >>> DSC is always enabled on bootup would not be true anymore. >> >> Why is that going to break? > > > Currently, the msm_host->dsc is initialized in attach() [1] and we do > widebus setup during power_on() [2]. So we can assume that if the panel > supports DSC, msm_host->dsc will be not NULL during power_on() and the > widebus setup will work as expected. > > However, if a panel supports enabling DSC after bootup, then > msm_host->dsc will be set later within the commit enable() path meaning > the necessary widebus setup during power_on() would *not* happen (as > *_is_widebus_enabled() would return false on account of msm_host->dsc == > NULL during power_on()). Minor corrections: - power_on() happens during pre_enable() stage, - the dynamic msm_host->dsc can also be set during pre_enable() stage. Note: there still exists dsi_mgr_bridge_mode_set(), which can also be used to set msm_host->dsc (however I would prefer to drop mode_set() completely and set the mode from atomic_enable(). I'd say, this is the minor issue. The dsi_timing_setup() is plagued with if (dsc) checks, so if we make DSC dynamic, it will have to be audited anyway. > > Thanks, > > Jessica Zhang > > [1] > https://elixir.bootlin.com/linux/v6.5-rc2/source/drivers/gpu/drm/msm/dsi/dsi_host.c#L1587 > > [2] > https://elixir.bootlin.com/linux/v6.5-rc2/source/drivers/gpu/drm/msm/dsi/dsi_host.c#L2359 > >> >> -- >> With best wishes >> Dmitry >> -- With best wishes Dmitry