From patchwork Wed Sep 14 12:54:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 9331355 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 EE1F160231 for ; Wed, 14 Sep 2016 12:55:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E047A1FFC9 for ; Wed, 14 Sep 2016 12:55:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D49522921C; Wed, 14 Sep 2016 12:55:53 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 9817A1FFC9 for ; Wed, 14 Sep 2016 12:55:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 25DDC6E3FC; Wed, 14 Sep 2016 12:55:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-x230.google.com (mail-pa0-x230.google.com [IPv6:2607:f8b0:400e:c03::230]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5B5ED6E239 for ; Wed, 14 Sep 2016 12:55:14 +0000 (UTC) Received: by mail-pa0-x230.google.com with SMTP id cm16so5345729pac.0 for ; Wed, 14 Sep 2016 05:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Y+AWD9clMk4iW5qPEx37GnV4ccRRkOUfvpLbhbaZ8O8=; b=fB8UcIQ1mjQcrG0qbDgQzpIFVwXG8/bV/kO4CeLEbxN+2AHtgG2ebqp6EX9RpDi+oU f2uO8DdAvHGpcoHlVkJA59ruoXBxtUR8RzktKcUMqXFJb4jXfrOfTiLEhgK2m/TRFN1n DV210SvBFTD75bYysTiaKgT+J+08XoogrXFyQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Y+AWD9clMk4iW5qPEx37GnV4ccRRkOUfvpLbhbaZ8O8=; b=MncYkKloZh3cwK0QdeZP8fa73nScNcc+0yOq/eFWnsexWXcgCkTZItkH0Y2JCQCZhH eG/Y0KsNvCziGVp71KE8SmKRBnhedtn5/9yoMq2uwFH/hAGnkHud16+zYTEdrLUg66Q5 eIPV/ayv7333chJUoFT/dAVcuAkXwl1w38cO/LP3u3764o6/TrcJgY82PvBKgA7gkUb8 B0Z6Xf7UGwfzLWlvF3R0+T+wWCdhkR3O5uhdsWVCsWxCr2mLx+apYO3qz9pBE7Q4YK1D YvUzL+AAwjiMPl4Ms46ETXRWN6by5plVbfeQ/5w2Bo7SU3kP1THvM+7zh7y+BAzf1DNf NE+A== X-Gm-Message-State: AE9vXwN3hHTEVdwNqV9757YB7L949aVVNS/11+jTyXoNiNUd3Kgr4kMJ626DlkiTRLFt6PFz X-Received: by 10.66.138.74 with SMTP id qo10mr4182001pab.135.1473857713114; Wed, 14 Sep 2016 05:55:13 -0700 (PDT) Received: from basement.tok.corp.google.com ([100.103.3.207]) by smtp.gmail.com with ESMTPSA id t7sm5601309paz.21.2016.09.14.05.55.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Sep 2016 05:55:12 -0700 (PDT) From: Tomasz Figa To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/8] drm/rockchip: Get rid of some unnecessary code Date: Wed, 14 Sep 2016 21:54:55 +0900 Message-Id: <1473857701-9250-3-git-send-email-tfiga@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1473857701-9250-1-git-send-email-tfiga@chromium.org> References: <1473857701-9250-1-git-send-email-tfiga@chromium.org> Cc: linux-kernel@vger.kernel.org, Tomasz Figa , linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org 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 Current code implements prepare_fb and cleanup_fb callbacks only to grab/release fb references, which is already done by atomic framework when creating/destryoing plane state. Let's remove these unused bits. Signed-off-by: Tomasz Figa --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 7e811cf..68988c6 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -641,22 +641,6 @@ static void vop_plane_destroy(struct drm_plane *plane) drm_plane_cleanup(plane); } -static int vop_plane_prepare_fb(struct drm_plane *plane, - struct drm_plane_state *new_state) -{ - if (plane->state->fb) - drm_framebuffer_reference(plane->state->fb); - - return 0; -} - -static void vop_plane_cleanup_fb(struct drm_plane *plane, - struct drm_plane_state *old_state) -{ - if (old_state->fb) - drm_framebuffer_unreference(old_state->fb); -} - static int vop_plane_atomic_check(struct drm_plane *plane, struct drm_plane_state *state) { @@ -849,8 +833,6 @@ static void vop_plane_atomic_update(struct drm_plane *plane, } static const struct drm_plane_helper_funcs plane_helper_funcs = { - .prepare_fb = vop_plane_prepare_fb, - .cleanup_fb = vop_plane_cleanup_fb, .atomic_check = vop_plane_atomic_check, .atomic_update = vop_plane_atomic_update, .atomic_disable = vop_plane_atomic_disable,