From patchwork Wed Jul 8 12:50:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 50877 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C232E22A03 for ; Wed, 8 Jul 2015 12:51:10 +0000 (UTC) Received: by wgjx7 with SMTP id x7sf69914602wgj.3 for ; Wed, 08 Jul 2015 05:51:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:subject:date :message-id:cc:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=+f0054n0lbfWl1q5GLwiMxpu5r4feZMtCj/6Wm5N4Xk=; b=DKNYcLgMnTSDRaYHXT/+yufTEZl3+2YmEQSsKk+mDyG1pf+lo3YJxXBeAECyNyYhGM hQm3YWMxBUTuDihp7nw7ZYd6sxd61GdO3Fo5ZsZ5TD8N0Q6Hv9m/fnGrmXMzsGOn1uhA IVJKEK/VFvE3Bdbr2lMd02y+Tvi3NWASdGFKP+0Bt34hD3fkWiXIj4QtodHXjaqK6TDA imA2w6shBBxUG27agpLyB+UB8nhDYV8wHpIfqksb9A5IdvQNBE8iFWrjPbfh5HuDIaR3 KhA9c4KtJ3KWLfV/AxgjZiYg8OmyHfRGNezBY4rD9RynAaq8RZxDJLvcW+uR/GnVzuwr edPQ== X-Gm-Message-State: ALoCoQkQTQYYjQYNmCky+bYwM3wOEH1hK1UrmNDxTeNDp19vo+n0ABqG/BKBMaf9iGSyc+hCKTPD X-Received: by 10.113.11.3 with SMTP id ee3mr4755869lbd.9.1436359870065; Wed, 08 Jul 2015 05:51:10 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.136 with SMTP id dc8ls331202lad.101.gmail; Wed, 08 Jul 2015 05:51:09 -0700 (PDT) X-Received: by 10.112.73.33 with SMTP id i1mr9454111lbv.31.1436359869921; Wed, 08 Jul 2015 05:51:09 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id ei11si1594133lad.43.2015.07.08.05.51.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2015 05:51:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbpo10 with SMTP id po10so55423973lbb.3 for ; Wed, 08 Jul 2015 05:51:09 -0700 (PDT) X-Received: by 10.152.37.228 with SMTP id b4mr9212448lak.117.1436359869773; Wed, 08 Jul 2015 05:51:09 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp3073244lbb; Wed, 8 Jul 2015 05:51:07 -0700 (PDT) X-Received: by 10.70.90.232 with SMTP id bz8mr20077534pdb.120.1436359866422; Wed, 08 Jul 2015 05:51:06 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id op7si3976992pbc.109.2015.07.08.05.50.38; Wed, 08 Jul 2015 05:51:06 -0700 (PDT) Received-SPF: pass (google.com: domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F13996E304; Wed, 8 Jul 2015 05:50:37 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0F43F6E304 for ; Wed, 8 Jul 2015 05:50:37 -0700 (PDT) Received: by wgov12 with SMTP id v12so10285734wgo.1 for ; Wed, 08 Jul 2015 05:50:35 -0700 (PDT) X-Received: by 10.194.2.51 with SMTP id 19mr20504153wjr.40.1436359835418; Wed, 08 Jul 2015 05:50:35 -0700 (PDT) Received: from LMENX321.lme.st.com (LPuteaux-656-1-48-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by smtp.gmail.com with ESMTPSA id ym2sm3309259wjc.44.2015.07.08.05.50.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jul 2015 05:50:34 -0700 (PDT) From: Benjamin Gaignard To: dri-devel@lists.freedesktop.org, airlied@linux.ie, vincent.abriou@st.com Subject: [PATCH] drm: sti: add moduleparam to disable fbdev Date: Wed, 8 Jul 2015 14:50:25 +0200 Message-Id: <1436359825-19875-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 Cc: Benjamin Gaignard X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: benjamin.gaignard@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Useful to avoid recompiling to enable/disable fbdev. Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/sti/Kconfig | 6 ------ drivers/gpu/drm/sti/sti_drm_drv.c | 13 ++++++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/sti/Kconfig b/drivers/gpu/drm/sti/Kconfig index fbccc10..e3aa5af 100644 --- a/drivers/gpu/drm/sti/Kconfig +++ b/drivers/gpu/drm/sti/Kconfig @@ -9,9 +9,3 @@ config DRM_STI select FW_LOADER_USER_HELPER_FALLBACK help Choose this option to enable DRM on STM stiH41x chipset - -config DRM_STI_FBDEV - bool "DRM frame buffer device for STMicroelectronics SoC stiH41x Serie" - depends on DRM_STI - help - Choose this option to enable FBDEV on top of DRM for STM stiH41x chipset diff --git a/drivers/gpu/drm/sti/sti_drm_drv.c b/drivers/gpu/drm/sti/sti_drm_drv.c index 59d558b..d0fb54a 100644 --- a/drivers/gpu/drm/sti/sti_drm_drv.c +++ b/drivers/gpu/drm/sti/sti_drm_drv.c @@ -30,6 +30,10 @@ #define STI_MAX_FB_HEIGHT 4096 #define STI_MAX_FB_WIDTH 4096 +static bool fbdev; +MODULE_PARM_DESC(fbdev, "Enable fbdev compat layer"); +module_param(fbdev, bool, S_IRUGO | S_IWUSR); + static void sti_drm_atomic_schedule(struct sti_drm_private *private, struct drm_atomic_state *state) { @@ -160,11 +164,10 @@ static int sti_drm_load(struct drm_device *dev, unsigned long flags) drm_mode_config_reset(dev); -#ifdef CONFIG_DRM_STI_FBDEV - drm_fbdev_cma_init(dev, 32, - dev->mode_config.num_crtc, - dev->mode_config.num_connector); -#endif + if (fbdev) + drm_fbdev_cma_init(dev, 32, dev->mode_config.num_crtc, + dev->mode_config.num_connector); + return 0; }