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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,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 DB176C64EB8 for ; Wed, 3 Oct 2018 20:43:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AAB9C213A2 for ; Wed, 3 Oct 2018 20:43:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AAB9C213A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727427AbeJDDdP (ORCPT ); Wed, 3 Oct 2018 23:33:15 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:49220 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726969AbeJDDdP (ORCPT ); Wed, 3 Oct 2018 23:33:15 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w93Kes3q120182 for ; Wed, 3 Oct 2018 16:43:15 -0400 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mw3dhma16-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 03 Oct 2018 16:43:15 -0400 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 3 Oct 2018 14:43:14 -0600 Received: from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 3 Oct 2018 14:43:11 -0600 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w93KhAAC25165996 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 3 Oct 2018 13:43:10 -0700 Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 370BF6E056; Wed, 3 Oct 2018 14:43:10 -0600 (MDT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 601BC6E050; Wed, 3 Oct 2018 14:43:09 -0600 (MDT) Received: from [9.41.179.222] (unknown [9.41.179.222]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 3 Oct 2018 14:43:09 -0600 (MDT) Subject: Re: [PATCH v3 2/2] media: platform: Add Aspeed Video Engine driver To: Hans Verkuil , Eddie James , linux-kernel@vger.kernel.org Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-aspeed@lists.ozlabs.org, andrew@aj.id.au, openbmc@lists.ozlabs.org, robh+dt@kernel.org, mchehab@kernel.org, linux-media@vger.kernel.org References: <1537903629-14003-1-git-send-email-eajames@linux.ibm.com> <1537903629-14003-3-git-send-email-eajames@linux.ibm.com> From: Eddie James Date: Wed, 3 Oct 2018 15:43:08 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 18100320-8235-0000-0000-00000E0C2523 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009816; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000267; SDB=6.01097423; UDB=6.00567539; IPR=6.00877466; MB=3.00023602; MTD=3.00000008; XFM=3.00000015; UTC=2018-10-03 20:43:14 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18100320-8236-0000-0000-000042DD39A1 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-03_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810030191 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/28/2018 06:30 AM, Hans Verkuil wrote: > On 09/25/2018 09:27 PM, Eddie James wrote: >> The Video Engine (VE) embedded in the Aspeed AST2400 and AST2500 SOCs >> can capture and compress video data from digital or analog sources. With >> the Aspeed chip acting a service processor, the Video Engine can capture >> the host processor graphics output. >> >> Add a V4L2 driver to capture video data and compress it to JPEG images. >> Make the video frames available through the V4L2 streaming interface. >> >> Signed-off-by: Eddie James >> + } >> + >> + video->height = (bottom - top) + 1; >> + video->width = (right - left) + 1; >> + size = video->height * video->width; > It looks like you can actually determine the blanking width/height and > possibly even more detailed information that would be very useful to > show with the DV_TIMINGS ioctls. Hmm. This information is related to the video signal captured from the host. That information has nothing to do with the buffer that is compressed and grabbed by the driver and ultimately provided to userspace. Isn't the timing information meaningless for JPEG frames? Forgot to include this question in my previous reply, sorry for the additional mail. Thanks, Eddie > >> + >> + /* 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, >> + FIELD_PREP(VE_TGS_FIRST, left - 1) | >> + FIELD_PREP(VE_TGS_LAST, right)); >> + aspeed_video_write(video, VE_TGS_1, >> + FIELD_PREP(VE_TGS_FIRST, top) | >>