From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F679C11F68 for ; Tue, 29 Jun 2021 14:46:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 080E961DC0 for ; Tue, 29 Jun 2021 14:46:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234550AbhF2Osg (ORCPT ); Tue, 29 Jun 2021 10:48:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234470AbhF2Osf (ORCPT ); Tue, 29 Jun 2021 10:48:35 -0400 Received: from mail-oo1-xc34.google.com (mail-oo1-xc34.google.com [IPv6:2607:f8b0:4864:20::c34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B19CBC061760 for ; Tue, 29 Jun 2021 07:46:07 -0700 (PDT) Received: by mail-oo1-xc34.google.com with SMTP id r14-20020a4ad4ce0000b029024b4146e2f5so5744382oos.1 for ; Tue, 29 Jun 2021 07:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=W2Ntt0LT4z/1elLySVWMmlMXipsIpCl6r1V3lH3DwEE=; b=EGeSkS7JW6EtUMDXLA6LoUTd4e7U32ADZX6Y27+Hrm66f0S58vWf/N1ztWMSPRRS3H 33jFMo7nq5GUQoz0kojUxM6JtTngYeG+Ni9DY5IcWIX0F0jwvfZJiWkNvbY1CZR/Ncpf Xy179mvbppePNBKx4BUPycvQaaewZ/nOO+VF+/492iI4rdTtAxknFKCOJnjpDnIezAsX zolRBUqdfOSy2nQJm+lqFHFabChODfct7fYoAucnkm42vDGaOGtEODELZ8TZv/d7cmlA 6DPqzVLPQO+KUMh2ZrvTxVBAFLFhQ5/y87GbvebTLrt62/GhZu3iE2OT0NMM/sNGjvOg fhsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=W2Ntt0LT4z/1elLySVWMmlMXipsIpCl6r1V3lH3DwEE=; b=l9insQ2u7xkjml4Lq81K0d0lbJpgb8GPjZadQhOswdDBHcXa/AAKZNHirPmd3tBo4x 0FMCZ7QhBbCSjAQyJp3B29muy24xqpnBmVQ35zvAy6aMfffUNcrKCivNfzbj4Zz1hJLA uJ2YQXAS+4j/v0+7FmB3LVy7/DjGuDC3syO4dQistMPnGpgIlufgXv+dqQi/Cdlzhthn JswtuYnPfT8vLnNNNa0d2dNuKNRo/Gaak2dZlYkg6KpEmIQKh625mztAW3uwzJ5gNbb6 C7utDwXlmqkYdtbLjhXsEGwNiEfAfpHoDmXI4DjST9hKDGcIA5DS5SVtsphbz+/lshED +z4Q== X-Gm-Message-State: AOAM533XXa45Y6Q51MHHK7MzBt1rwBoKZ6eMIu1qOLPk14TFeyKijL4Q q8ACim/V0t/BM5DWA+1A2XXDBw== X-Google-Smtp-Source: ABdhPJwuPka4W9yOMDvrX6GUrWsbedu8EBEiJblO9SsbN8jZivaLELaiLeHMRVIpdlT/EvGXh8p5kw== X-Received: by 2002:a4a:ae8c:: with SMTP id u12mr4341303oon.3.1624977966886; Tue, 29 Jun 2021 07:46:06 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id c4sm904642ots.15.2021.06.29.07.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jun 2021 07:46:06 -0700 (PDT) Date: Tue, 29 Jun 2021 09:46:04 -0500 From: Bjorn Andersson To: abhinavk@codeaurora.org Cc: Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/msm/dp: Make it possible to enable the test pattern Message-ID: References: <20210629002234.1787149-1-bjorn.andersson@linaro.org> <2d922441927d1c2a757b5b197f496906@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2d922441927d1c2a757b5b197f496906@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Mon 28 Jun 20:07 CDT 2021, abhinavk@codeaurora.org wrote: > On 2021-06-28 17:55, Bjorn Andersson wrote: > > On Mon 28 Jun 19:31 CDT 2021, abhinavk@codeaurora.org wrote: > > > > > Hi Bjorn > > > > > > On 2021-06-28 17:22, Bjorn Andersson wrote: > > > > The debugfs interface contains the knobs to make the DisplayPort > > > > controller output a test pattern, unfortunately there's nothing > > > > currently that actually enables the defined test pattern. > > > > > > > > Fixes: de3ee25473ba ("drm/msm/dp: add debugfs nodes for video pattern > > > > tests") > > > > Signed-off-by: Bjorn Andersson > > > > > > This is not how this debugfs node works. This is meant to be used > > > while > > > running > > > DP compliance video pattern test. > > > > > > https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/tools/msm_dp_compliance.c > > > > > > While the compliance test is being run with this msm_dp_compliance app > > > running, > > > it will draw the test pattern when it gets the "test_active" from the > > > driver. > > > > > > The test pattern which this app draws is as per the requirements of > > > the > > > compliance test > > > as the test equipment will match the CRC of the pattern which is > > > drawn. > > > > > > The API dp_panel_tpg_config() which you are trying to call here > > > draws the DP > > > test pattern > > > from the DP controller hardware but not the pattern which the > > > compliance > > > test expects. > > > > > > > So clearly not an oversight, but rather me not understanding how to use > > the test pattern. > > > > You say that I should run msm_dp_compliance while the test is running, > > so how do I run the test? > > There are two test patterns with different purposes. The one which the > msm_dp_compliance > draws is strictly for the DP compliance test and it needs even the DPU to > draw the frame because > it sets up the display pipeline and just draws the buffer. > > That is not what you are looking for here. > > So rather than trying to run msm_dp_compliance on your setup, just try > calling dp_panel_tpg_config(). > We typically just call this API, right after the link training is done. > But if you really need a debugfs node for this, you can write up a separate > debugfs for it > Something like: > > echo 1 > dp/tpg/en > Having the ability to turn on the test pattern was very useful to me and I would use this next time I'm adding DP support on a new platform. So adding some way of invoking that API without a lot of extra effort seems useful. > Lets not disturb this one. > Agreed. Thanks, Bjorn > > > > > Its just a debug API to call when required during bringup/debug > > > purposes. > > > > > > > Yes, I was trying to isolate the DP code from some misconfiguration in > > the DPU during bringup and with this fix the debugfs interface became > > useful. > > > > > Regards, > > Bjorn > > > > > Hence this is not the place to call it as it will end up breaking CTS. > > > > > > Thanks > > > > > > Abhinav > > > > > > > --- > > > > drivers/gpu/drm/msm/dp/dp_debug.c | 2 ++ > > > > 1 file changed, 2 insertions(+) > > > > > > > > diff --git a/drivers/gpu/drm/msm/dp/dp_debug.c > > > > b/drivers/gpu/drm/msm/dp/dp_debug.c > > > > index 2f6247e80e9d..82911af44905 100644 > > > > --- a/drivers/gpu/drm/msm/dp/dp_debug.c > > > > +++ b/drivers/gpu/drm/msm/dp/dp_debug.c > > > > @@ -305,6 +305,8 @@ static ssize_t dp_test_active_write(struct file > > > > *file, > > > > debug->panel->video_test = true; > > > > else > > > > debug->panel->video_test = false; > > > > + > > > > + dp_panel_tpg_config(debug->panel, debug->panel->video_test); > > > > } > > > > } > > > > drm_connector_list_iter_end(&conn_iter); From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FCDEC11F67 for ; Tue, 29 Jun 2021 14:46:09 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3DDEC61DC0 for ; Tue, 29 Jun 2021 14:46:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3DDEC61DC0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B117389E8C; Tue, 29 Jun 2021 14:46:08 +0000 (UTC) Received: from mail-oo1-xc36.google.com (mail-oo1-xc36.google.com [IPv6:2607:f8b0:4864:20::c36]) by gabe.freedesktop.org (Postfix) with ESMTPS id C419289E8C for ; Tue, 29 Jun 2021 14:46:07 +0000 (UTC) Received: by mail-oo1-xc36.google.com with SMTP id 128-20020a4a11860000b029024b19a4d98eso5748101ooc.5 for ; Tue, 29 Jun 2021 07:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=W2Ntt0LT4z/1elLySVWMmlMXipsIpCl6r1V3lH3DwEE=; b=EGeSkS7JW6EtUMDXLA6LoUTd4e7U32ADZX6Y27+Hrm66f0S58vWf/N1ztWMSPRRS3H 33jFMo7nq5GUQoz0kojUxM6JtTngYeG+Ni9DY5IcWIX0F0jwvfZJiWkNvbY1CZR/Ncpf Xy179mvbppePNBKx4BUPycvQaaewZ/nOO+VF+/492iI4rdTtAxknFKCOJnjpDnIezAsX zolRBUqdfOSy2nQJm+lqFHFabChODfct7fYoAucnkm42vDGaOGtEODELZ8TZv/d7cmlA 6DPqzVLPQO+KUMh2ZrvTxVBAFLFhQ5/y87GbvebTLrt62/GhZu3iE2OT0NMM/sNGjvOg fhsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=W2Ntt0LT4z/1elLySVWMmlMXipsIpCl6r1V3lH3DwEE=; b=CCoyMmpYSGotwt3b7Vm4Z2rZ4iHYA85HQawq4m69B9BxSeNmgd+J35Dl7UDtzj2cfl vTZh+KuAJnWrM0noy1/39/atNhlPtH2OCa2prlMw2G9Tx0sSyTgQs+CXKPpwX6GeU6+a Lpk5VciIU0/gDrAGYykAflr6U9Ga2Mw72jQbFjrgVpaz4aiNUGlwajRHpE36pvySS7Q6 uK4LDcJVXPR3R2Geg8MdYKMsXR6pGpxvux5qibu6uj0HElQrydsGuYJvhV5wsXAHQmpW j+QAW5fJpviZe4PLyxpBeiS4yxXEXurMXVY+TWaTEGiikt/Pfm/vR+3KPdoOFUKNV4Ob 2pPg== X-Gm-Message-State: AOAM530YE5SGhkI+6AJQHUipoM4bLLtR75FwtWLMocK3TyqOeA/zg5Jz OkkuHRJVNrhsHsuV1ryw0NGjMg== X-Google-Smtp-Source: ABdhPJwuPka4W9yOMDvrX6GUrWsbedu8EBEiJblO9SsbN8jZivaLELaiLeHMRVIpdlT/EvGXh8p5kw== X-Received: by 2002:a4a:ae8c:: with SMTP id u12mr4341303oon.3.1624977966886; Tue, 29 Jun 2021 07:46:06 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id c4sm904642ots.15.2021.06.29.07.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jun 2021 07:46:06 -0700 (PDT) Date: Tue, 29 Jun 2021 09:46:04 -0500 From: Bjorn Andersson To: abhinavk@codeaurora.org Subject: Re: [PATCH] drm/msm/dp: Make it possible to enable the test pattern Message-ID: References: <20210629002234.1787149-1-bjorn.andersson@linaro.org> <2d922441927d1c2a757b5b197f496906@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2d922441927d1c2a757b5b197f496906@codeaurora.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: freedreno@lists.freedesktop.org, David Airlie , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon 28 Jun 20:07 CDT 2021, abhinavk@codeaurora.org wrote: > On 2021-06-28 17:55, Bjorn Andersson wrote: > > On Mon 28 Jun 19:31 CDT 2021, abhinavk@codeaurora.org wrote: > > > > > Hi Bjorn > > > > > > On 2021-06-28 17:22, Bjorn Andersson wrote: > > > > The debugfs interface contains the knobs to make the DisplayPort > > > > controller output a test pattern, unfortunately there's nothing > > > > currently that actually enables the defined test pattern. > > > > > > > > Fixes: de3ee25473ba ("drm/msm/dp: add debugfs nodes for video pattern > > > > tests") > > > > Signed-off-by: Bjorn Andersson > > > > > > This is not how this debugfs node works. This is meant to be used > > > while > > > running > > > DP compliance video pattern test. > > > > > > https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/tools/msm_dp_compliance.c > > > > > > While the compliance test is being run with this msm_dp_compliance app > > > running, > > > it will draw the test pattern when it gets the "test_active" from the > > > driver. > > > > > > The test pattern which this app draws is as per the requirements of > > > the > > > compliance test > > > as the test equipment will match the CRC of the pattern which is > > > drawn. > > > > > > The API dp_panel_tpg_config() which you are trying to call here > > > draws the DP > > > test pattern > > > from the DP controller hardware but not the pattern which the > > > compliance > > > test expects. > > > > > > > So clearly not an oversight, but rather me not understanding how to use > > the test pattern. > > > > You say that I should run msm_dp_compliance while the test is running, > > so how do I run the test? > > There are two test patterns with different purposes. The one which the > msm_dp_compliance > draws is strictly for the DP compliance test and it needs even the DPU to > draw the frame because > it sets up the display pipeline and just draws the buffer. > > That is not what you are looking for here. > > So rather than trying to run msm_dp_compliance on your setup, just try > calling dp_panel_tpg_config(). > We typically just call this API, right after the link training is done. > But if you really need a debugfs node for this, you can write up a separate > debugfs for it > Something like: > > echo 1 > dp/tpg/en > Having the ability to turn on the test pattern was very useful to me and I would use this next time I'm adding DP support on a new platform. So adding some way of invoking that API without a lot of extra effort seems useful. > Lets not disturb this one. > Agreed. Thanks, Bjorn > > > > > Its just a debug API to call when required during bringup/debug > > > purposes. > > > > > > > Yes, I was trying to isolate the DP code from some misconfiguration in > > the DPU during bringup and with this fix the debugfs interface became > > useful. > > > > > Regards, > > Bjorn > > > > > Hence this is not the place to call it as it will end up breaking CTS. > > > > > > Thanks > > > > > > Abhinav > > > > > > > --- > > > > drivers/gpu/drm/msm/dp/dp_debug.c | 2 ++ > > > > 1 file changed, 2 insertions(+) > > > > > > > > diff --git a/drivers/gpu/drm/msm/dp/dp_debug.c > > > > b/drivers/gpu/drm/msm/dp/dp_debug.c > > > > index 2f6247e80e9d..82911af44905 100644 > > > > --- a/drivers/gpu/drm/msm/dp/dp_debug.c > > > > +++ b/drivers/gpu/drm/msm/dp/dp_debug.c > > > > @@ -305,6 +305,8 @@ static ssize_t dp_test_active_write(struct file > > > > *file, > > > > debug->panel->video_test = true; > > > > else > > > > debug->panel->video_test = false; > > > > + > > > > + dp_panel_tpg_config(debug->panel, debug->panel->video_test); > > > > } > > > > } > > > > drm_connector_list_iter_end(&conn_iter);