From: Mark yao <mark.yao@rock-chips.com>
To: Heiko Stuebner <heiko@sntech.de>, linux-arm-kernel@lists.infradead.org
Cc: David Airlie <airlied@linux.ie>,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v5 1/7] drm/rockchip: vop: initialize registers directly
Date: Wed, 26 Jul 2017 08:59:10 +0800 [thread overview]
Message-ID: <5977E95E.1040700@rock-chips.com> (raw)
In-Reply-To: <3165793.eZGRgZzZRy@phil>
On 2017年07月26日 06:36, Heiko Stuebner wrote:
> Hi Mark,
>
> Am Donnerstag, 20. Juli 2017, 10:43:22 CEST schrieb Mark Yao:
>> At present we are using init_table to initialize some
>> registers, but the Register init table use un-document define,
>> it is unreadable, and sometimes we only want to update tiny
>> bits, init table method is not friendly, it's diffcult to
>> reuse for difference chips.
>>
>> To make it clean, initialize registers directly, and drops
>> init_table mechanism out.
>>
>> Changes in v3:
>> - Explain more in details
>>
>> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
> [...]
>
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
>> index bafd698..00e9d79 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
>> @@ -127,13 +127,7 @@
>> .cfg_done = VOP_REG(RK3036_REG_CFG_DONE, 0x1, 0),
>> };
>>
>> -static const struct vop_reg_data rk3036_vop_init_reg_table[] = {
>> - {RK3036_DSP_CTRL1, 0x00000000},
>> -};
>> -
>> static const struct vop_data rk3036_vop = {
>> - .init_table = rk3036_vop_init_reg_table,
>> - .table_size = ARRAY_SIZE(rk3036_vop_init_reg_table),
>> .ctrl = &rk3036_ctrl_data,
>> .intr = &rk3036_intr,
>> .win = rk3036_vop_win_data,
> This seems to break vop initialization on my rk3036 kylin board.
>
> Before, kylin was able to bring output to the hdmi but with this
> patch applied this stops working. As the init-value is to zero it seems
> there is still something turned on, that should be turned off instead.
>
> rk3288 seems to stay in working condition though.
>
>
> Heiko
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>
>
>
Hi Heiko
Thanks for your testing on rk3036 board.
I research the init table on rk3036, the dsp_blank reset value is 1, we need set the register to zero.
So I think not working problem can be fixed by following change:
drivers/gpu/drm/rockchip/rockchip_vop_reg.c:
static const struct vop_ctrl rk3036_ctrl_data = {
.standby = VOP_REG(RK3036_SYS_CTRL, 0x1, 30),
+ .dsp_blank = VOP_REG(RK3036_DSP_CTRL1, 0x1, 24),
.out_mode = VOP_REG(RK3036_DSP_CTRL0, 0xf, 0),
.pin_pol = VOP_REG(RK3036_DSP_CTRL0, 0xf, 4),
.htotal_pw = VOP_REG(RK3036_DSP_HTOTAL_HS_END, 0x1fff1fff, 0),
--
Mark Yao
next prev parent reply other threads:[~2017-07-26 0:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 2:42 [PATCH v5 0/7] drm/rockchip: add all full framework vop support Mark Yao
2017-07-20 2:43 ` [PATCH v5 1/7] drm/rockchip: vop: initialize registers directly Mark Yao
2017-07-25 22:36 ` Heiko Stuebner
2017-07-26 0:59 ` Mark yao [this message]
2017-07-20 2:43 ` [PATCH v5 2/7] drm/rockchip: vop: move write_relaxed flags to vop register Mark Yao
2017-07-25 21:47 ` Heiko Stuebner
2017-07-26 6:17 ` Mark yao
2017-07-20 2:43 ` [PATCH v5 3/7] drm/rockchip: vop: move line_flag_num to interrupt registers Mark Yao
2017-07-25 21:54 ` Heiko Stuebner
2017-07-26 6:17 ` Mark yao
2017-07-20 2:43 ` [PATCH v5 4/7] drm/rockchip: vop: group vop registers Mark Yao
2017-07-20 2:43 ` [PATCH v5 5/7] drm/rockchip: vop: add a series of vop support Mark Yao
2017-07-20 2:43 ` [PATCH v5 6/7] dt-bindings: display: rockchip: fill Documents for vop series Mark Yao
2017-07-24 19:53 ` Rob Herring
2017-07-25 0:30 ` Mark yao
2017-07-20 2:44 ` [PATCH v5 7/7] drm/rockchip: vop: rk3328: fix overlay abnormal Mark Yao
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=5977E95E.1040700@rock-chips.com \
--to=mark.yao@rock-chips.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.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