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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 202ADC00449 for ; Wed, 3 Oct 2018 20:27:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CDA5921476 for ; Wed, 3 Oct 2018 20:27:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CDA5921476 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 S1727251AbeJDDQ6 (ORCPT ); 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 >