From patchwork Thu Sep 29 20:48:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Lengfeld X-Patchwork-Id: 9357047 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A9DC660757 for ; Thu, 29 Sep 2016 20:51:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 993A429C4A for ; Thu, 29 Sep 2016 20:51:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E31929C4C; Thu, 29 Sep 2016 20:51:41 +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=-4.2 required=2.0 tests=BAYES_00, 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 3640029C4A for ; Thu, 29 Sep 2016 20:51:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9A7C66E91F; Thu, 29 Sep 2016 20:51:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from stcim.de (stcim.de [IPv6:2a01:4f8:120:4065::2]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7FA406E91F for ; Thu, 29 Sep 2016 20:51:38 +0000 (UTC) Received: from 55d43dce.access.ecotel.net ([85.212.61.206] helo=localhost.localdomain) by stcim.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bpiGN-0003IC-JF; Thu, 29 Sep 2016 22:49:03 +0200 From: Stefan Christ To: dri-devel@lists.freedesktop.org Subject: [PATCH 20/20] drm/gma500: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops Date: Thu, 29 Sep 2016 22:48:56 +0200 Message-Id: <1475182136-15191-21-git-send-email-contact@stefanchrist.eu> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1475182136-15191-1-git-send-email-contact@stefanchrist.eu> References: <1475182136-15191-1-git-send-email-contact@stefanchrist.eu> Cc: Stefan Christ X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This refactoring leads to real functional changes in the driver. Now the struct psbfb_ops implements two additional members: .fb_setcmap = drm_fb_helper_setcmap, .fb_pan_display = drm_fb_helper_pan_display, and the struct psbfb_roll_ops implements one additional member: .fb_setcmap = drm_fb_helper_setcmap, and the struct psbfb_unaccel_ops implements two additional members: .fb_setcmap = drm_fb_helper_setcmap, .fb_pan_display = drm_fb_helper_pan_display, These changes are not tested. Cc: Patrik Jakobsson Signed-off-by: Stefan Christ --- drivers/gpu/drm/gma500/framebuffer.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index 0fcdce0..24aa16b 100644 --- a/drivers/gpu/drm/gma500/framebuffer.c +++ b/drivers/gpu/drm/gma500/framebuffer.c @@ -186,9 +186,7 @@ static int psbfb_mmap(struct fb_info *info, struct vm_area_struct *vma) static struct fb_ops psbfb_ops = { .owner = THIS_MODULE, - .fb_check_var = drm_fb_helper_check_var, - .fb_set_par = drm_fb_helper_set_par, - .fb_blank = drm_fb_helper_blank, + DRM_FB_HELPER_DEFAULT_OPS, .fb_setcolreg = psbfb_setcolreg, .fb_fillrect = drm_fb_helper_cfb_fillrect, .fb_copyarea = psbfb_copyarea, @@ -199,9 +197,7 @@ static struct fb_ops psbfb_ops = { static struct fb_ops psbfb_roll_ops = { .owner = THIS_MODULE, - .fb_check_var = drm_fb_helper_check_var, - .fb_set_par = drm_fb_helper_set_par, - .fb_blank = drm_fb_helper_blank, + DRM_FB_HELPER_DEFAULT_OPS, .fb_setcolreg = psbfb_setcolreg, .fb_fillrect = drm_fb_helper_cfb_fillrect, .fb_copyarea = drm_fb_helper_cfb_copyarea, @@ -212,9 +208,7 @@ static struct fb_ops psbfb_roll_ops = { static struct fb_ops psbfb_unaccel_ops = { .owner = THIS_MODULE, - .fb_check_var = drm_fb_helper_check_var, - .fb_set_par = drm_fb_helper_set_par, - .fb_blank = drm_fb_helper_blank, + DRM_FB_HELPER_DEFAULT_OPS, .fb_setcolreg = psbfb_setcolreg, .fb_fillrect = drm_fb_helper_cfb_fillrect, .fb_copyarea = drm_fb_helper_cfb_copyarea,