Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp161601imm; Wed, 3 Oct 2018 13:45:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV60DHcaO80f6zEdNdW4Q9sIwZxHrpiXsqebIp48VISAztoG8K6RohuK+sFTJAiz2+Em10tuZ X-Received: by 2002:a63:ac11:: with SMTP id v17-v6mr2924697pge.196.1538599545418; Wed, 03 Oct 2018 13:45:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538599545; cv=none; d=google.com; s=arc-20160816; b=JvEGbz4OpgX/hEN92GxsPk2jG3rCY5SA6W4ERaBMwyZURdnNfVSsB1LtWPWliIoVxc 8bG46VdK0yXOOc3Pq9bnuNSba4+IHB+lo6omHEs5Uzpwrb93TVo1ZWJ5W+0Bx/5BFE1O J0YhAGlBi96R28Okbl0T8ySoD0v/At7E7FPyScZ1mbpNV7o0dwl7R3cPr4oXlkTAzRCp 30BFfzsR82f29NBfAHY26pYqJ3ynCNCfLBSbNrDR29vvgZnC2cZK+9dxTRaPBzxX0z5n W2jXjdPsbbA8agxN1/HxpegBs5w0QvR62O4fkS64O9Ox56B1leHpmyxbrMPY8Gyg/mHg b8Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject; bh=P+CouUzlsmUtTkP5My1kNgjXFTmIp7yDZQsqLQe8WLo=; b=Q5i/+zJIdg/y8ZSe6RUuocdMQ09Cv67FKPf5J4PEesm2D1c7Nq/CE3jJMihZ4VPn7n 0kIHRKpqHzh1pq3+R1vkVLfhetkdyVK/cAaYWe1suG4niuv1S5ZyOLCWxD7TRA3BS/h4 xNlpKYUvgbCt2usi+BV+tu3BPEbF2WPnBpSGHcidhp2GG0z4wbB9JFawN3hYmqYFDwtk CAbnWp+s9xYE3wvIXdTQ2dXAIjSWo3O55o97KbVCes5TAe9bYFkGaHQzd+vKjt1tKdxW OFHLhknILwf2p4jxMECuA16NHKtQJ04bbxa/iHGp9R9V9tukxevM+qy91HBU6dfzOWEn lueA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h79-v6si2941866pfa.238.2018.10.03.13.45.29; Wed, 03 Oct 2018 13:45:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727407AbeJDDdP (ORCPT + 99 others); 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) | >>