public inbox for linux-aspeed@lists.ozlabs.org
 help / color / mirror / Atom feed
From: Eddie James <eajames@linux.vnet.ibm.com>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH v3 10/10] media: aspeed: add a workaround to fix a silicon bug
Date: Wed, 12 Jun 2019 10:03:52 -0500	[thread overview]
Message-ID: <7486bdf6-8ab1-4e96-d5ca-b1b0f018af6b@linux.vnet.ibm.com> (raw)
In-Reply-To: <490d6111-32c1-f8f4-dc3c-39314446709e@xs4all.nl>


On 6/12/19 2:17 AM, Hans Verkuil wrote:
> Eddie: ping!
>
> Regards,
>
> 	Hans
>
> On 6/6/19 2:53 AM, Jae Hyun Yoo wrote:
>> Hi Eddie,
>>
>> All patches in this series were queued to linux/media tree except this
>> one. Can you please review this patch?
>>
>> Thanks,
>> Jae
>>
>> On 5/31/2019 3:15 PM, Jae Hyun Yoo wrote:
>>> AST2500 silicon revision A1 and A2 have a silicon bug which causes
>>> extremly long capturing time on specific resolutions (1680 width).
>>> To fix the bug, this commit adjusts the capturing window register
>>> setting to 1728 if detected width is 1680. The compression window
>>> register setting will be kept as the original width so output
>>> result will be the same.


Sorry, missed your followup email Jae and assumed everything was merged.


Looks fine to me.

Reviewed-by: Eddie James <eajames@linux.ibm.com>


>>>
>>> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
>>> ---
>>> v2 -> v3:
>>>    Added more detail comments why the value 1728 is picked.
>>>
>>> v1 -> v2:
>>>    New.
>>>
>>>    drivers/media/platform/aspeed-video.c | 28 ++++++++++++++++++++-------
>>>    1 file changed, 21 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
>>> index ba093096a5a7..f899ac3b4a61 100644
>>> --- a/drivers/media/platform/aspeed-video.c
>>> +++ b/drivers/media/platform/aspeed-video.c
>>> @@ -824,8 +824,29 @@ static void aspeed_video_set_resolution(struct aspeed_video *video)
>>>    	struct v4l2_bt_timings *act = &video->active_timings;
>>>    	unsigned int size = act->width * act->height;
>>>    
>>> +	/* Set capture/compression frame sizes */
>>>    	aspeed_video_calc_compressed_size(video, size);
>>>    
>>> +	if (video->active_timings.width == 1680) {
>>> +		/*
>>> +		 * This is a workaround to fix a silicon bug on A1 and A2
>>> +		 * revisions. Since it doesn't break capturing operation of
>>> +		 * other revisions, use it for all revisions without checking
>>> +		 * the revision ID. It picked 1728 which is a very next
>>> +		 * 64-pixels aligned value to 1680 to minimize memory bandwidth
>>> +		 * and to get better access speed from video engine.
>>> +		 */
>>> +		aspeed_video_write(video, VE_CAP_WINDOW,
>>> +				   1728 << 16 | act->height);
>>> +		size += (1728 - 1680) * video->active_timings.height;
>>> +	} else {
>>> +		aspeed_video_write(video, VE_CAP_WINDOW,
>>> +				   act->width << 16 | act->height);
>>> +	}
>>> +	aspeed_video_write(video, VE_COMP_WINDOW,
>>> +			   act->width << 16 | act->height);
>>> +	aspeed_video_write(video, VE_SRC_SCANLINE_OFFSET, act->width * 4);
>>> +
>>>    	/* Don't use direct mode below 1024 x 768 (irqs don't fire) */
>>>    	if (size < DIRECT_FETCH_THRESHOLD) {
>>>    		aspeed_video_write(video, VE_TGS_0,
>>> @@ -842,13 +863,6 @@ static void aspeed_video_set_resolution(struct aspeed_video *video)
>>>    		aspeed_video_update(video, VE_CTRL, 0, VE_CTRL_DIRECT_FETCH);
>>>    	}
>>>    
>>> -	/* Set capture/compression frame sizes */
>>> -	aspeed_video_write(video, VE_CAP_WINDOW,
>>> -			   act->width << 16 | act->height);
>>> -	aspeed_video_write(video, VE_COMP_WINDOW,
>>> -			   act->width << 16 | act->height);
>>> -	aspeed_video_write(video, VE_SRC_SCANLINE_OFFSET, act->width * 4);
>>> -
>>>    	size *= 4;
>>>    
>>>    	if (size != video->srcs[0].size) {
>>>

  reply	other threads:[~2019-06-12 15:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 22:15 [PATCH v3 00/10] Improve stability and add bug fixes of Aspeed video engine driver Jae Hyun Yoo
2019-05-31 22:15 ` [PATCH v3 01/10] media: aspeed: fix a kernel warning on clk control Jae Hyun Yoo
2019-05-31 22:15 ` [PATCH v3 02/10] media: aspeed: refine clock control logic Jae Hyun Yoo
2019-05-31 22:15 ` [PATCH v3 03/10] media: aspeed: change irq to threaded irq Jae Hyun Yoo
2019-05-31 22:15 ` [PATCH v3 04/10] media: aspeed: remove IRQF_SHARED flag Jae Hyun Yoo
2019-05-31 22:15 ` [PATCH v3 05/10] media: aspeed: reduce noisy log printing outs Jae Hyun Yoo
2019-05-31 22:15 ` [PATCH v3 06/10] media: aspeed: remove checking of VE_INTERRUPT_CAPTURE_COMPLETE Jae Hyun Yoo
2019-05-31 22:15 ` [PATCH v3 07/10] media: aspeed: refine interrupt handling logic Jae Hyun Yoo
2019-05-31 22:15 ` [PATCH v3 08/10] media: aspeed: remove source buffer allocation before mode detection Jae Hyun Yoo
2019-05-31 22:15 ` [PATCH v3 09/10] media: aspeed: use different delays for triggering VE H/W reset Jae Hyun Yoo
2019-05-31 22:15 ` [PATCH v3 10/10] media: aspeed: add a workaround to fix a silicon bug Jae Hyun Yoo
2019-06-06  0:53   ` Jae Hyun Yoo
2019-06-12  7:17     ` Hans Verkuil
2019-06-12 15:03       ` Eddie James [this message]
2019-06-12 16:13         ` Jae Hyun Yoo

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=7486bdf6-8ab1-4e96-d5ca-b1b0f018af6b@linux.vnet.ibm.com \
    --to=eajames@linux.vnet.ibm.com \
    --cc=linux-aspeed@lists.ozlabs.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