linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: abhinavk@codeaurora.org
To: Marijn Suijten <marijn.suijten@somainline.org>
Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	swboyd@chromium.org, khsieh@codeaurora.org,
	seanpaul@chromium.org, dmitry.baryshkov@linaro.org,
	aravindh@codeaurora.org, freedreno@lists.freedesktop.org
Subject: Re: [PATCH] drm/msm/dsi: add support for dsi test pattern generator
Date: Thu, 15 Jul 2021 17:01:07 -0700	[thread overview]
Message-ID: <f6235d170811ad02bf6321dcb5ef3568@codeaurora.org> (raw)
In-Reply-To: <61cdcd07-5bff-a8ae-7156-b85b9c6c8801@somainline.org>

Hi Marijn

Sorry for the late response.

On 2021-07-13 02:10, Marijn Suijten wrote:
> On 6/29/21 9:04 PM, Abhinav Kumar wrote:
>> During board bringups its useful to have a DSI test pattern
>> generator to isolate a DPU vs a DSI issue and focus on the relevant
>> hardware block.
>> 
>> To facilitate this, add an API which triggers the DSI controller
>> test pattern. The expected output is a rectangular checkered pattern.
>> 
>> This has been validated on a single DSI video mode panel by calling it
>> right after drm_panel_enable() which is also the ideal location to use
>> this as the DSI host and the panel have been initialized by then.
>> 
>> Further validation on dual DSI and command mode panel is pending.
>> If there are any fix ups needed for those, it shall be applied on top
>> of this change.
>> 
>> Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> 
> 
> Tested-by: Marijn Suijten <marijn.suijten@somainline.org>
> 
> [...]
Thanks for testing this.
>> +static void msm_dsi_host_cmd_test_pattern_setup(struct msm_dsi_host 
>> *msm_host)
>> +{
>> +	u32 reg;
>> +
>> +	reg = dsi_read(msm_host, REG_DSI_TEST_PATTERN_GEN_CTRL);
>> +
>> +	dsi_write(msm_host, REG_DSI_TEST_PATTERN_GEN_CMD_MDP_INIT_VAL0, 
>> 0xff);
>> +
>> +	reg |= (0x3 << 0x8);
>> +	dsi_write(msm_host, REG_DSI_TEST_PATTERN_GEN_CTRL, reg);
>> +	/* draw checkered rectangle pattern */
>> +	dsi_write(msm_host, REG_DSI_TPG_MAIN_CONTROL2, (0x1 << 0x7));
> 
> 
> How about BIT(7)?

You mean BIT(7) of REG_DSI_TPG_MAIN_CONTROL2? Thats what this is right?
Did you mean some other bit?

> 
> On SM6125 this seems to change the color intensity of the pattern; it
> is always colored lines of a few pixels wide alternating R, B and G
> from left to right.  Is it possible to document the meaning and
> available values of these registers, especially if they differ between
> SoC / DSI block?
> 

I have requested access for SM6125, will check this register on that to 
see if there
is any difference.

Are you saying you are not seeing a rectangular checkered pattern while 
testing?
Also are you testing on command mode or video mode?

As requested by Rob, I will add the bit definitions and update the 
dsi.xml.h in the
next patchset for the registers and the bits which I am using here.

With that the meaning of these bits will be more clear.

I dont think I will be able to document all the bits because the goal of 
this patch
was only to draw a test pattern to help with validation. Different bits 
of the REG_DSI_TPG_MAIN_CONTROL2
register only draw different patterns so the goal wasnt that we can draw 
any pattern, it was just to
draw some pattern on the screen.

When we add support for all other patterns, we can expose those bits as 
well but it should not
be required in my opinion.

> Kind regards,
> Marijn
> 
>> +	DBG("Cmd test pattern setup done\n");
>> +}
> [...]

  reply	other threads:[~2021-07-16  0:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29 19:04 [PATCH] drm/msm/dsi: add support for dsi test pattern generator Abhinav Kumar
2021-06-29 20:58 ` Dmitry Baryshkov
2021-07-13  9:10 ` Marijn Suijten
2021-07-16  0:01   ` abhinavk [this message]
2021-08-10 22:59     ` Marijn Suijten
2021-08-10 23:24       ` [Freedreno] " abhinavk
2021-07-13 16:47 ` Rob Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f6235d170811ad02bf6321dcb5ef3568@codeaurora.org \
    --to=abhinavk@codeaurora.org \
    --cc=aravindh@codeaurora.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=khsieh@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=seanpaul@chromium.org \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).