public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark yao <mark.yao@rock-chips.com>
To: Heiko Stuebner <heiko@sntech.de>
Cc: David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/7] drm/rockchip: vop: move write_relaxed flags to vop register
Date: Wed, 26 Jul 2017 14:17:23 +0800	[thread overview]
Message-ID: <597833F3.4050307@rock-chips.com> (raw)
In-Reply-To: <2048476.V4PpOSpEqb@phil>

On 2017年07月26日 05:47, Heiko Stuebner wrote:
> Hi Mark,
>
> Am Donnerstag, 20. Juli 2017, 10:43:27 CEST schrieb Mark Yao:
>> Since the drm atomic framework, only a small part of the vop
>> register needs sync write, Currently seems only following registers
>> need sync write:
>>     cfg_done, standby and interrupt related register.
>>
>> All ctrl registers are using the sync write method that is
>> inefficient, hardcode the write_relaxed flags to vop registers,
>> then can only do synchronize write for those actual needed register.
>>
>> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
>> ---
>>   drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 14 +++-------
>>   drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 42 ++++++++++++++++-------------
>>   2 files changed, 28 insertions(+), 28 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
>> index 81164d6..784a2b7 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
>> @@ -42,18 +42,12 @@
>>   #include "rockchip_drm_psr.h"
>>   #include "rockchip_drm_vop.h"
>>   
>> -#define __REG_SET_RELAXED(x, off, mask, shift, v, write_mask) \
>> -		vop_mask_write(x, off, mask, shift, v, write_mask, true)
>> -
>> -#define __REG_SET_NORMAL(x, off, mask, shift, v, write_mask) \
>> -		vop_mask_write(x, off, mask, shift, v, write_mask, false)
>> -
>>   #define REG_SET(x, base, reg, v, mode) \
>> -		__REG_SET_##mode(x, base + reg.offset, \
>> -				 reg.mask, reg.shift, v, reg.write_mask)
>> +		vop_mask_write(x, base + reg.offset, reg.mask, reg.shift, \
>> +			       v, reg.write_mask, reg.relaxed)
>>   #define REG_SET_MASK(x, base, reg, mask, v, mode) \
>> -		__REG_SET_##mode(x, base + reg.offset, \
>> -				 mask, reg.shift, v, reg.write_mask)
>> +		vop_mask_write(x, base + reg.offset, \
>> +			       mask, reg.shift, v, reg.write_mask, reg.relaxed)
> you only introduce the relaxed element of struct vop_reg in patch4.
> So using it here produces a compile error
>
> ../drivers/gpu/drm/rockchip/rockchip_drm_vop.c: In function ‘vop_cfg_done’:
> ../drivers/gpu/drm/rockchip/rockchip_drm_vop.c:47:33: error: ‘const struct vop_reg’ has no member named ‘relaxed’
>             v, reg.write_mask, reg.relaxed)
>                                   ^
> ../drivers/gpu/drm/rockchip/rockchip_drm_vop.c:59:3: note: in expansion of macro ‘REG_SET’
>     REG_SET(x, 0, (x)->data->ctrl->name, v, NORMAL)
>     ^~~~~~~
> ../drivers/gpu/drm/rockchip/rockchip_drm_vop.c:201:2: note: in expansion of macro ‘VOP_CTRL_SET’
>    VOP_CTRL_SET(vop, cfg_done, 1);
>    ^~~~~~~~~~~~
>
> when only patches 1+2 are applied. So the relaxed field addition should
> definitly move into this patch to not break bisectability.
>
>
> Heiko
>
>
>
>
Hi Heiko

Thanks for the test, will fix it at next version.

-- 
Mark Yao

  reply	other threads:[~2017-07-26  6:17 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
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 [this message]
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=597833F3.4050307@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