From patchwork Mon Jul 13 06:38:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archit Taneja X-Patchwork-Id: 6774731 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3612B9F2E8 for ; Mon, 13 Jul 2015 06:38:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4F159205F3 for ; Mon, 13 Jul 2015 06:38:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5E048205BD for ; Mon, 13 Jul 2015 06:38:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751222AbbGMGiu (ORCPT ); Mon, 13 Jul 2015 02:38:50 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55292 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751272AbbGMGiu (ORCPT ); Mon, 13 Jul 2015 02:38:50 -0400 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 30BC41408F2; Mon, 13 Jul 2015 06:38:50 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 22C221408FF; Mon, 13 Jul 2015 06:38:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (unknown [202.46.23.61]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: architt@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C00731408F2; Mon, 13 Jul 2015 06:38:48 +0000 (UTC) From: Archit Taneja To: dri-devel@lists.freedesktop.org, daniel@ffwll.ch Cc: linux-arm-msm@vger.kernel.org, airlied@linux.ie, Archit Taneja Subject: [PATCH 06/25] drm/fb_helper: Create a wrapper for remove_conflicting_framebuffers Date: Mon, 13 Jul 2015 12:08:02 +0530 Message-Id: <1436769501-4105-7-git-send-email-architt@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1436769501-4105-1-git-send-email-architt@codeaurora.org> References: <1436769501-4105-1-git-send-email-architt@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some drm drivers call remove_conflicting_framebuffers. Create a drm_fb_helper function that wraps around these calls. This is part of an effort to prevent drm drivers from calling fbdev functions directly, in order to make fbdev emulation a top level drm option. Signed-off-by: Archit Taneja --- drivers/gpu/drm/drm_fb_helper.c | 7 +++++++ include/drm/drm_fb_helper.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index bb35103..389c2a7 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -819,6 +819,13 @@ void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state) } EXPORT_SYMBOL(drm_fb_helper_set_suspend); +int drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a, + const char *name, bool primary) +{ + return remove_conflicting_framebuffers(a, name, primary); +} +EXPORT_SYMBOL(drm_fb_helper_remove_conflicting_framebuffers); + static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green, u16 blue, u16 regno, struct fb_info *info) { diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index 200771e..cc19e88 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h @@ -168,6 +168,9 @@ void drm_fb_helper_cfb_imageblit(struct fb_info *info, void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state); +int drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a, + const char *name, bool primary); + int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info); int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);