Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp146673imm; Wed, 3 Oct 2018 13:28:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV62dXQCTjlaSXnWh35NWIPXzpCE3cfoUYJKuNJ+9W2uDevyZjcSloiLKC/IEG2gHkzewdGg8 X-Received: by 2002:a17:902:9a48:: with SMTP id x8-v6mr3244897plv.72.1538598520985; Wed, 03 Oct 2018 13:28:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538598520; cv=none; d=google.com; s=arc-20160816; b=yR0G5WPLR/hDrunzgGhscQg0d8Ai84veWi4XJIoGl0YKjBjPWG3ABCIR8y+k10FJs/ 4jQTF1wrrpDON+Z0mXgGSYyuulbMt4OXOHrnyCd8lLBw0xiZb7AOzcCalZKGxWxy/6ip IvKZzpgRjFU3LucstSkRDWFiwkTtqMnBQPs2tNpji/goxo+zeNO/omOWSC3UyqGiLyCK UG+VN/IDGV+CGRMXQNO0tw/HR5oUXWZbWVRI/Ek6wHskT7u9Y2MhdQQ6jQXtE7hp/lxD oT2LC80psi4Dga0XnKWfWVhSkTq41KVPFm9bG++2uVOY/agcyz3DtEOBJ6VWTiZWh2C/ FLvw== 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=7BMBM5804qoEUWxr79MJnBRe2eMxpZQ/86ztRdarNfc=; b=XUjKFO+eEw7eyLBOE3xhjB7o+VVRJ6QFqr2EZz6WYPALDZ1QCnvwiDWpSEwCwvk1ed MvBzuj6Oq4r9QppOM0sIXHaT76nQBDFSPYwhWO1Ka0dIy1OrHxn38Ma7E4e/MNZA5KxY GP70JnGl/rvxRaM/dF5cKJ2CnTpfYEcTp3ozqCvGNZ/fyKd9PQ2DntFRr5xERJwGEn2p 8AoC49cX8sPv1dWUXw9GB9WVafTuIgb6/VK67FmJhEBZhKxVLxvCMCUTPEkMKjEEw4+3 AwmlIEZg+xav6g7Ee9lVczL7bd1MO0IVzoW95PqcKmELctOk3Ihyq7mW5DSMFJU8Udmt 0BRA== 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 o186-v6si3162148pfo.236.2018.10.03.13.28.25; Wed, 03 Oct 2018 13:28:40 -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 S1727209AbeJDDQ6 (ORCPT + 99 others); Wed, 3 Oct 2018 23:16:58 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50282 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727077AbeJDDQ6 (ORCPT ); Wed, 3 Oct 2018 23:16:58 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w93KNurp046345 for ; Wed, 3 Oct 2018 16:27:00 -0400 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0b-001b2d01.pphosted.com with ESMTP id 2mw4nx8aah-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 03 Oct 2018 16:27:00 -0400 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 3 Oct 2018 14:26:59 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e33.co.us.ibm.com (192.168.1.133) 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:26:56 -0600 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w93KQtsm52035594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 3 Oct 2018 13:26:55 -0700 Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 355D06E054; Wed, 3 Oct 2018 14:26:55 -0600 (MDT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 606796E05B; Wed, 3 Oct 2018 14:26:54 -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:26:54 -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:26:53 -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-0036-0000-0000-00000A43A72C 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.01097418; UDB=6.00567536; IPR=6.00877461; MB=3.00023601; MTD=3.00000008; XFM=3.00000015; UTC=2018-10-03 20:26:59 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18100320-0037-0000-0000-000049284E11 Message-Id: <8ca47483-5347-c40d-0d01-4f13e88f8cde@linux.vnet.ibm.com> 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-1810030189 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. >> >> + memcpy(&table[base], aspeed_video_jpeg_dct[i], >> + sizeof(aspeed_video_jpeg_dct[i])); >> + >> + base += ASPEED_VIDEO_JPEG_DCT_SIZE; >> + memcpy(&table[base], aspeed_video_jpeg_quant, >> + sizeof(aspeed_video_jpeg_quant)); >> + >> + if (yuv420) >> + table[base + 2] = 0x00220103; >> + } >> +} >> + >> +static void aspeed_video_update(struct aspeed_video *video, u32 reg, >> + unsigned long mask, u32 bits) > You probably want to use u32 for the mask. Using a u32 there results in: warning: large integer implicitly truncated to unsigned type [-Woverflow] everywhere I call aspeed_video_update. Not sure what the deal is. Any suggestions? Thanks, Eddie > >> +{ >> + u32 t = readl(video->base + reg); >> + u32 before = t; >> + >> + t &= mask; >> + t |= bits; >> + writel(t, video->base + reg); >> + dev_dbg(video->dev, "update %03x[%08x -> %08x]\n", reg, before, >> >> + >> +module_platform_driver(aspeed_video_driver); >> + >> +MODULE_DESCRIPTION("ASPEED Video Engine Driver"); >> +MODULE_AUTHOR("Eddie James"); >> +MODULE_LICENSE("GPL v2"); >> > Regards, > > Hans >