From patchwork Wed May 22 10:15:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10955557 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A4BB8112C for ; Wed, 22 May 2019 10:15:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9601A28A45 for ; Wed, 22 May 2019 10:15:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A3CC28B6E; Wed, 22 May 2019 10:15:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B080828B75 for ; Wed, 22 May 2019 10:15:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 58E878925A; Wed, 22 May 2019 10:15:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B6488925A for ; Wed, 22 May 2019 10:15:39 +0000 (UTC) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190522101537euoutp027a751c8e8fd5bf65d1b13e392dd36be3~g_c7UG7Af0096400964euoutp02Y for ; Wed, 22 May 2019 10:15:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190522101537euoutp027a751c8e8fd5bf65d1b13e392dd36be3~g_c7UG7Af0096400964euoutp02Y Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190522101537eucas1p1f7812bd5cf91f685eadd65139204d3e8~g_c68FAc71081010810eucas1p1k; Wed, 22 May 2019 10:15:37 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id B0.E8.04298.94125EC5; Wed, 22 May 2019 11:15:37 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190522101536eucas1p12e71e836b8d5983f26ec50324156b926~g_c6Oj--t1081010810eucas1p1j; Wed, 22 May 2019 10:15:36 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190522101536eusmtrp25c2931906d41c5320e661acda7b4fe36~g_c6AcN082564725647eusmtrp2z; Wed, 22 May 2019 10:15:36 +0000 (GMT) X-AuditID: cbfec7f2-f2dff700000010ca-c7-5ce5214938d1 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 9B.60.04140.84125EC5; Wed, 22 May 2019 11:15:36 +0100 (BST) Received: from [106.120.51.71] (unknown [106.120.51.71]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190522101535eusmtip240a6689d03d52c29a7c2f974647b1f09~g_c5cYoQh1251612516eusmtip2h; Wed, 22 May 2019 10:15:35 +0000 (GMT) From: Bartlomiej Zolnierkiewicz Subject: [PATCH 1/2] video: fbdev: pvr2fb: remove function prototypes To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Message-ID: <2a32648a-69c8-47a6-109a-6c2f764b2534@samsung.com> Date: Wed, 22 May 2019 12:15:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42LZduznOV1PxacxBnPvsFpc+fqezeJE3wdW i8u75rA5MHvc7z7O5PF5k1wAUxSXTUpqTmZZapG+XQJXxv6dZ9kL/mhVfLsm08B4R7GLkYND QsBE4uGEqC5GTg4hgRWMEo8/AtlcQPYXRonbcx+yQiQ+M0p8PS8AYoPUt35bzgIRX84o8fuw KUTDW0aJWZeawBJsAlYSE9tXMYLYwgKuEk9X9DCD2CICCRIrps8Ai/MK2Ek8njeVDcRmEVCV aH/6GmyZqECExP1jG1ghagQlTs58AjaTWUBc4taT+UwQtrzE9rdzmEEWSwjcZpP4sPoEE8Q3 LhKX9kZCHCos8er4FnYIW0bi/06QXpD6dYwSfzteQDVvZ5RYPvkfG0SVtcTh4xdZQQYxC2hK rN+lDxF2lNiw7xoLxHw+iRtvBSFu4JOYtG06M0SYV6KjTQiiWk1iw7INbDBru3auhCrxkPh2 twASbLES7f2L2SYwKsxC8uQsJE/OQvLkLIRzFjCyrGIUTy0tzk1PLTbMSy3XK07MLS7NS9dL zs/dxAhMGaf/Hf+0g/HrpaRDjAIcjEo8vBYPH8cIsSaWFVfmHmKU4GBWEuE9fepRjBBvSmJl VWpRfnxRaU5q8SFGaQ4WJXHeaoYH0UIC6YklqdmpqQWpRTBZJg5OqQZGRwazTwtZsll38E5p WPWluuH67or+7ntyeUbGmYn5KVP5LRSTbfMZ9b0fpb7+UbHZa8e8l9f5DFfoHpNkKDrGVnPQ RPKj8bPse7HXK41/KovG8ZnyvDtdpd3iK/vxyIJvkxiyXnB+OMi7zOBB8+UDC/YXx0q21cVc aDcxto2ee493V9HcGAMlluKMREMt5qLiRADGUubnFQMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCLMWRmVeSWpSXmKPExsVy+t/xe7oeik9jDGb9ErK48vU9m8WJvg+s Fpd3zWFzYPa4332cyePzJrkApig9m6L80pJUhYz84hJbpWhDCyM9Q0sLPSMTSz1DY/NYKyNT JX07m5TUnMyy1CJ9uwS9jP07z7IX/NGq+HZNpoHxjmIXIyeHhICJROu35SxdjFwcQgJLGSUu Pj3O3MXIAZSQkTi+vgyiRljiz7UuNoia14wSB2ccYQdJsAlYSUxsX8UIYgsLuEo8XdHDDGKL CCRIPH09nw3E5hWwk3g8byqYzSKgKtH+9DUriC0qECFx5v0KFogaQYmTM5+A2cwC6hJ/5l1i hrDFJW49mc8EYctLbH87h3kCI/8sJC2zkLTMQtIyC0nLAkaWVYwiqaXFuem5xUZ6xYm5xaV5 6XrJ+bmbGIEhvu3Yzy07GLveBR9iFOBgVOLhfXDvcYwQa2JZcWXuIUYJDmYlEd7Tpx7FCPGm JFZWpRblxxeV5qQWH2I0BXpoIrOUaHI+MP7ySuINTQ3NLSwNzY3Njc0slMR5OwQOxggJpCeW pGanphakFsH0MXFwSjUwXkqYGtBz/lylTq0mH+ulr4+03t5ov3zZLNLq5oe7iYwieq9/8bza d+3UsWmtB5bppz5SrlrKyGc2TS/Xxe/xvq+zf1t47S98apujUWibcSt54pwKjcvzd69eICp0 jOdbbG/JjO/7D88w3GP2tD/2dvjKWqvyxKnXS7ZPEE84W6SwJ3rrpq7FO5VYijMSDbWYi4oT Aderj5WHAgAA X-CMS-MailID: 20190522101536eucas1p12e71e836b8d5983f26ec50324156b926 X-Msg-Generator: CA X-RootMTR: 20190522101536eucas1p12e71e836b8d5983f26ec50324156b926 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190522101536eucas1p12e71e836b8d5983f26ec50324156b926 References: X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1558520137; bh=lgBQ+8uTfQLkV5PxSZgmgCh8/JrIEUqTDsyfWM/9dxM=; h=From:Subject:To:Date:References:From; b=TyZ+ZcFgG2o0RIttpGeKeyEQOSBoMhAjQhBt7fGCYVU1rsojri08t7QM8CwvemggF vMh/mkW5CgabVTWWrpR9iG1YvOKfM6QMcSiZ76250U9u1qIwHpmbO08D1lOOwBavvG DE53t9CFLhqn1mo3/D8N8tBiLUOp+KV+ENGay6Tw= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Reorder code a bit and then remove no longer needed function prototypes. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/video/fbdev/pvr2fb.c | 141 ++++++++++++++++++------------------------- 1 file changed, 61 insertions(+), 80 deletions(-) Index: b/drivers/video/fbdev/pvr2fb.c =================================================================== --- a/drivers/video/fbdev/pvr2fb.c +++ b/drivers/video/fbdev/pvr2fb.c @@ -193,39 +193,6 @@ static unsigned int shdma = PVR2_CASCADE static unsigned int pvr2dma = ONCHIP_NR_DMA_CHANNELS; #endif -static int pvr2fb_setcolreg(unsigned int regno, unsigned int red, unsigned int green, unsigned int blue, - unsigned int transp, struct fb_info *info); -static int pvr2fb_blank(int blank, struct fb_info *info); -static unsigned long get_line_length(int xres_virtual, int bpp); -static void set_color_bitfields(struct fb_var_screeninfo *var); -static int pvr2fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info); -static int pvr2fb_set_par(struct fb_info *info); -static void pvr2_update_display(struct fb_info *info); -static void pvr2_init_display(struct fb_info *info); -static void pvr2_do_blank(void); -static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id); -static int pvr2_init_cable(void); -static int pvr2_get_param(const struct pvr2_params *p, const char *s, - int val, int size); -#ifdef CONFIG_PVR2_DMA -static ssize_t pvr2fb_write(struct fb_info *info, const char *buf, - size_t count, loff_t *ppos); -#endif - -static struct fb_ops pvr2fb_ops = { - .owner = THIS_MODULE, - .fb_setcolreg = pvr2fb_setcolreg, - .fb_blank = pvr2fb_blank, - .fb_check_var = pvr2fb_check_var, - .fb_set_par = pvr2fb_set_par, -#ifdef CONFIG_PVR2_DMA - .fb_write = pvr2fb_write, -#endif - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, -}; - static struct fb_videomode pvr2_modedb[] = { /* * Broadcast video modes (PAL and NTSC). I'm unfamiliar with @@ -353,6 +320,36 @@ static int pvr2fb_setcolreg(unsigned int return 0; } +/* + * Determine the cable type and initialize the cable output format. Don't do + * anything if the cable type has been overidden (via "cable:XX"). + */ + +#define PCTRA 0xff80002c +#define PDTRA 0xff800030 +#define VOUTC 0xa0702c00 + +static int pvr2_init_cable(void) +{ + if (cable_type < 0) { + fb_writel((fb_readl(PCTRA) & 0xfff0ffff) | 0x000a0000, + PCTRA); + cable_type = (fb_readw(PDTRA) >> 8) & 3; + } + + /* Now select the output format (either composite or other) */ + /* XXX: Save the previous val first, as this reg is also AICA + related */ + if (cable_type == CT_COMPOSITE) + fb_writel(3 << 8, VOUTC); + else if (cable_type == CT_RGB) + fb_writel(1 << 9, VOUTC); + else + fb_writel(0, VOUTC); + + return cable_type; +} + static int pvr2fb_set_par(struct fb_info *info) { struct pvr2fb_par *par = (struct pvr2fb_par *)info->par; @@ -641,36 +638,6 @@ static irqreturn_t pvr2fb_interrupt(int return IRQ_HANDLED; } -/* - * Determine the cable type and initialize the cable output format. Don't do - * anything if the cable type has been overidden (via "cable:XX"). - */ - -#define PCTRA 0xff80002c -#define PDTRA 0xff800030 -#define VOUTC 0xa0702c00 - -static int pvr2_init_cable(void) -{ - if (cable_type < 0) { - fb_writel((fb_readl(PCTRA) & 0xfff0ffff) | 0x000a0000, - PCTRA); - cable_type = (fb_readw(PDTRA) >> 8) & 3; - } - - /* Now select the output format (either composite or other) */ - /* XXX: Save the previous val first, as this reg is also AICA - related */ - if (cable_type == CT_COMPOSITE) - fb_writel(3 << 8, VOUTC); - else if (cable_type == CT_RGB) - fb_writel(1 << 9, VOUTC); - else - fb_writel(0, VOUTC); - - return cable_type; -} - #ifdef CONFIG_PVR2_DMA static ssize_t pvr2fb_write(struct fb_info *info, const char *buf, size_t count, loff_t *ppos) @@ -741,6 +708,37 @@ out_unmap: } #endif /* CONFIG_PVR2_DMA */ +static struct fb_ops pvr2fb_ops = { + .owner = THIS_MODULE, + .fb_setcolreg = pvr2fb_setcolreg, + .fb_blank = pvr2fb_blank, + .fb_check_var = pvr2fb_check_var, + .fb_set_par = pvr2fb_set_par, +#ifdef CONFIG_PVR2_DMA + .fb_write = pvr2fb_write, +#endif + .fb_fillrect = cfb_fillrect, + .fb_copyarea = cfb_copyarea, + .fb_imageblit = cfb_imageblit, +}; + +static int pvr2_get_param(const struct pvr2_params *p, const char *s, int val, + int size) +{ + int i; + + for (i = 0 ; i < size ; i++ ) { + if (s != NULL) { + if (!strncasecmp(p[i].name, s, strlen(s))) + return p[i].val; + } else { + if (p[i].val == val) + return (int)p[i].name; + } + } + return -1; +} + /** * pvr2fb_common_init * @@ -990,23 +988,6 @@ static void __exit pvr2fb_pci_exit(void) } #endif /* CONFIG_PCI */ -static int pvr2_get_param(const struct pvr2_params *p, const char *s, int val, - int size) -{ - int i; - - for (i = 0 ; i < size ; i++ ) { - if (s != NULL) { - if (!strncasecmp(p[i].name, s, strlen(s))) - return p[i].val; - } else { - if (p[i].val == val) - return (int)p[i].name; - } - } - return -1; -} - /* * Parse command arguments. Supported arguments are: * inverse Use inverse color maps From patchwork Wed May 22 10:16:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10955563 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C67C716C1 for ; Wed, 22 May 2019 10:16:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B629D2861D for ; Wed, 22 May 2019 10:16:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA6E3289E8; Wed, 22 May 2019 10:16:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 470892861D for ; Wed, 22 May 2019 10:16:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7BBC2893EA; Wed, 22 May 2019 10:16:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id CFDBB893EA for ; Wed, 22 May 2019 10:16:53 +0000 (UTC) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190522101652euoutp01ae95bce3fa603eb829fccde47c535186~g_eA0eLXx1046710467euoutp01E for ; Wed, 22 May 2019 10:16:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190522101652euoutp01ae95bce3fa603eb829fccde47c535186~g_eA0eLXx1046710467euoutp01E Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190522101652eucas1p24116cc89a6cbbb09eb4362bffea8afc1~g_eAiODEw2076820768eucas1p2B; Wed, 22 May 2019 10:16:52 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id D1.7A.04325.39125EC5; Wed, 22 May 2019 11:16:51 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190522101651eucas1p18b5ce16f065cc83125b4bd97e141bdcd~g_d-nN1WP0802608026eucas1p1c; Wed, 22 May 2019 10:16:51 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190522101650eusmtrp1544f819395d5213933e9dcf3cb0a6557~g_d-ZNwY61575615756eusmtrp1j; Wed, 22 May 2019 10:16:50 +0000 (GMT) X-AuditID: cbfec7f5-b8fff700000010e5-11-5ce52193cb80 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 15.44.04146.29125EC5; Wed, 22 May 2019 11:16:50 +0100 (BST) Received: from [106.120.51.71] (unknown [106.120.51.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190522101650eusmtip1538beca633b2f218a1f248f6afcaaa5c~g_d-Kx9AT1737217372eusmtip1I; Wed, 22 May 2019 10:16:50 +0000 (GMT) From: Bartlomiej Zolnierkiewicz Subject: [PATCH 2/2] video: fbdev: pvr2fb: add COMPILE_TEST support To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Message-ID: <2d2b283e-a5c5-3c94-423c-8cb085492921@samsung.com> Date: Wed, 22 May 2019 12:16:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnleLIzCtJLcpLzFFi42LZduznOd3Jik9jDJ52Gllc+fqezeJE3wdW i8u75rA5MHvc7z7O5PF5k1wAUxSXTUpqTmZZapG+XQJXRvtPr4KXshWL9n5lbWC8INHFyMkh IWAise/jeyYQW0hgBaPE331OXYxcQPYXRonmHZNZIZzPjBKf/09kh+nY8aiNGSKxnFFi+Z59 UFVvGSWefp0DNotNwEpiYvsqRhBbWMBZ4t/XLmYQW0QgQWLF9BlgcV4BO4mNS2aDTWURUJX4 s3EHWK+oQITE/WMbWCFqBCVOznzCAmIzC4hL3HoynwnClpfY/nYO2BUSArfZJF6cfc8GcZ6L xIHWa0wQtrDEq+NboM6WkTg9uYcFomEd0KMdL6C6twP9MPkfVLe1xOHjF4FWcwCt0JRYv0sf Iuwo0b9gEjtIWEKAT+LGW0GII/gkJm2bzgwR5pXoaBOCqFaT2LBsAxvM2q6dK5khbA+JE5N3 sEPCOlbiz5P9rBMYFWYheXMWkjdnIXlzFsI9CxhZVjGKp5YW56anFhvnpZbrFSfmFpfmpesl 5+duYgQmj9P/jn/dwbjvT9IhRgEORiUeXouHj2OEWBPLiitzDzFKcDArifCePvUoRog3JbGy KrUoP76oNCe1+BCjNAeLkjhvNcODaCGB9MSS1OzU1ILUIpgsEwenVAPjhvzMO/fu3XqWt47L tPeOF4vb5Np9qd4uM1lf9RcdY9B5mdqxZsa2l81bLh7hvHVIX9VTmEV1Z0hD+rHthy9n1ud4 bOeo117ZuFfu/prs3x1vy6US9dvcb5cHvlvKo3bvSu6ORG6uTZ/6p/+dlbxAduqnmMULbJRW nLpxPIjtZKoiQ9OF3gevlFiKMxINtZiLihMBQO+FIxoDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMLMWRmVeSWpSXmKPExsVy+t/xu7qTFJ/GGFw7ZGxx5et7NosTfR9Y LS7vmsPmwOxxv/s4k8fnTXIBTFF6NkX5pSWpChn5xSW2StGGFkZ6hpYWekYmlnqGxuaxVkam Svp2NimpOZllqUX6dgl6Ge0/vQpeylYs2vuVtYHxgkQXIyeHhICJxI5HbcwgtpDAUkaJ44el uhg5gOIyEsfXl0GUCEv8udbF1sXIBVTymlHi4MINjCAJNgEriYntq8BsYQFniX9fu8DmiAgk SDx9PZ8NxOYVsJPYuGQ2O4jNIqAq8WfjDiYQW1QgQuLM+xUsEDWCEidnPgGzmQXUJf7Mu8QM YYtL3HoynwnClpfY/nYO8wRG/llIWmYhaZmFpGUWkpYFjCyrGEVSS4tz03OLDfWKE3OLS/PS 9ZLzczcxAgN827Gfm3cwXtoYfIhRgINRiYf3wb3HMUKsiWXFlbmHGCU4mJVEeE+fehQjxJuS WFmVWpQfX1Sak1p8iNEU6KGJzFKiyfnA6MsriTc0NTS3sDQ0NzY3NrNQEuftEDgYIySQnliS mp2aWpBaBNPHxMEp1cA44cHJ+8fNeB0fMjyb0Wb06MMevkNCW9us1h1Usj/jqHMn+0qFstVB edepT63Em/4yGkU63f82x8Ki7OKVc4WfJ3nNVI8qqJ7X3eBycNnH6M9HHQzUp2k7K2aVLLbk reNb/lOd+e2777tmL1w0/dOmu+fSFnc/yZN4bSTS29Rubrz+pifrQ479SizFGYmGWsxFxYkA OGcmnYYCAAA= X-CMS-MailID: 20190522101651eucas1p18b5ce16f065cc83125b4bd97e141bdcd X-Msg-Generator: CA X-RootMTR: 20190522101651eucas1p18b5ce16f065cc83125b4bd97e141bdcd X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190522101651eucas1p18b5ce16f065cc83125b4bd97e141bdcd References: X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1558520212; bh=oCncskAnrdgh5DuLw8OQaOlD6EWhWD31JIykVZ3fx9E=; h=From:Subject:To:Date:References:From; b=Kq7OToEEVqtGrhgTN/dOAPq93aVnWmOhDolsYbnEe22KlW/oiZ1BPwSXDB7IzUGVL 60cjNlnYvvCb/IEuhI6k5H0cetBlx1Q6S2pfkh6OOPVF7zRYqO4gL4c8HcjlMIQ+Av hJkhbOVQ7vZq9QNiXlqnH6HaF6v0TJgtXx+Y9oRc= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add COMPILE_TEST support to pvr2fb driver for better compile testing coverage. While at it mark pvr2fb_interrupt() and pvr2fb_common_init() with __maybe_unused tag (to silence build warnings when !SH_DREAMCAST), also convert mmio_base in struct pvr2fb_par to 'void __iomem *' from 'unsigned long' (needed to silence build warnings on ARM). Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/video/fbdev/Kconfig | 3 ++- drivers/video/fbdev/pvr2fb.c | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) Index: b/drivers/video/fbdev/Kconfig =================================================================== --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -807,7 +807,8 @@ config FB_XVR1000 config FB_PVR2 tristate "NEC PowerVR 2 display support" - depends on FB && SH_DREAMCAST + depends on FB && HAS_IOMEM + depends on SH_DREAMCAST || COMPILE_TEST select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT Index: b/drivers/video/fbdev/pvr2fb.c =================================================================== --- a/drivers/video/fbdev/pvr2fb.c +++ b/drivers/video/fbdev/pvr2fb.c @@ -139,7 +139,7 @@ static struct pvr2fb_par { unsigned char is_doublescan; /* Are scanlines output twice? (doublescan) */ unsigned char is_lowres; /* Is horizontal pixel-doubling enabled? */ - unsigned long mmio_base; /* MMIO base */ + void __iomem *mmio_base; /* MMIO base */ u32 palette[16]; } *currentpar; @@ -325,9 +325,9 @@ static int pvr2fb_setcolreg(unsigned int * anything if the cable type has been overidden (via "cable:XX"). */ -#define PCTRA 0xff80002c -#define PDTRA 0xff800030 -#define VOUTC 0xa0702c00 +#define PCTRA ((void __iomem *)0xff80002c) +#define PDTRA ((void __iomem *)0xff800030) +#define VOUTC ((void __iomem *)0xa0702c00) static int pvr2_init_cable(void) { @@ -619,7 +619,7 @@ static void pvr2_do_blank(void) is_blanked = do_blank > 0 ? do_blank : 0; } -static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id) +static irqreturn_t __maybe_unused pvr2fb_interrupt(int irq, void *dev_id) { struct fb_info *info = dev_id; @@ -757,7 +757,7 @@ static int pvr2_get_param(const struct p * in for flexibility anyways. Who knows, maybe someone has tv-out on a * PCI-based version of these things ;-) */ -static int pvr2fb_common_init(void) +static int __maybe_unused pvr2fb_common_init(void) { struct pvr2fb_par *par = currentpar; unsigned long modememused, rev; @@ -770,8 +770,8 @@ static int pvr2fb_common_init(void) goto out_err; } - par->mmio_base = (unsigned long)ioremap_nocache(pvr2_fix.mmio_start, - pvr2_fix.mmio_len); + par->mmio_base = ioremap_nocache(pvr2_fix.mmio_start, + pvr2_fix.mmio_len); if (!par->mmio_base) { printk(KERN_ERR "pvr2fb: Failed to remap mmio space\n"); goto out_err; @@ -838,7 +838,7 @@ out_err: if (fb_info->screen_base) iounmap(fb_info->screen_base); if (par->mmio_base) - iounmap((void *)par->mmio_base); + iounmap(par->mmio_base); return -ENXIO; } @@ -905,8 +905,8 @@ static void __exit pvr2fb_dc_exit(void) fb_info->screen_base = NULL; } if (currentpar->mmio_base) { - iounmap((void *)currentpar->mmio_base); - currentpar->mmio_base = 0; + iounmap(currentpar->mmio_base); + currentpar->mmio_base = NULL; } free_irq(HW_EVENT_VSYNC, fb_info); @@ -955,8 +955,8 @@ static void pvr2fb_pci_remove(struct pci fb_info->screen_base = NULL; } if (currentpar->mmio_base) { - iounmap((void *)currentpar->mmio_base); - currentpar->mmio_base = 0; + iounmap(currentpar->mmio_base); + currentpar->mmio_base = NULL; } pci_release_regions(pdev);