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: 6746841 Return-Path: X-Original-To: patchwork-dri-devel@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 CE8599F2F0 for ; Wed, 8 Jul 2015 12:50:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0609C2069E for ; Wed, 8 Jul 2015 12:50:40 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id EEAD32069B for ; Wed, 8 Jul 2015 12:50:38 +0000 (UTC) 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-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; bh=fXFVhHH847vxuGtvqo9+Jf/MK6bX6bTUzg+F8CC724k=; b=id0EdKNdZzow9ZwhhrfpxO50LF6O7wXEYr7Cc8N0PsDOK1eh3q98hMo6EZbBl8CN+r dQ0LAi9zHYUnA7e3tav+aavjBc7gK0cZBIvDzD8f4GiakgKr2M5H4X9gF+IyndC+Nj9v 12d+X6l3tBIqhLvpZnTIoCKFZHvKzjTvCgie1I/7KJmgdLGiE9XDE35o7Te+W4XGD28u KTQVpNGcxZFoF/gCOAVHEQ6nhtYuBm2ljyg2k8dNvUQ/RL/tqM6+feIbjJuJTZJI6AxW Fsv4D9R0dUI3grDrjXMDU7UQI4yCaV2St/ywHYC6JATp3zYDx//kfjHqznaBzsz6fxJa 16kw== X-Gm-Message-State: ALoCoQm3YFjy0r0JYlDmg8VeyGUpehoTkz/R36V4zb9CxBgWTsd0zhrA6Wzdn2ABM5XmTTC+/umD 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: 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-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Useful to avoid recompiling to enable/disable fbdev. Signed-off-by: Benjamin Gaignard Reviewed-by: Zhao Junwang --- 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; }