From patchwork Fri Feb 21 07:55:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 3694871 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 90F449F1EE for ; Fri, 21 Feb 2014 07:55:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C92C420145 for ; Fri, 21 Feb 2014 07:55:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id F37CC20142 for ; Fri, 21 Feb 2014 07:55:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E7B82FB425; Thu, 20 Feb 2014 23:55:46 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-bk0-f47.google.com (mail-bk0-f47.google.com [209.85.214.47]) by gabe.freedesktop.org (Postfix) with ESMTP id 47EC6FB426 for ; Thu, 20 Feb 2014 23:55:36 -0800 (PST) Received: by mail-bk0-f47.google.com with SMTP id d7so931815bkh.6 for ; Thu, 20 Feb 2014 23:55:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZbW9n3flaxEgxWTvtXqM8GtCe3NCAJZ28HEG3GQ5PU0=; b=H1L0f97CHmaZFqew7jVPm2NmJ+piekNxc9p9JgODjqLAxmZ+EYITN74UGH4dBeCSj1 ga8/sxlbwe5ivtV9SfaFUKDgJIp4zPH4WrDiRU1r/nO54ByGMIIqxU4vHASKR7cGVUc4 PlvmWXWCaz2+JAamO2Gee1o0NA9BXDim6kPNMrOXwpffYTOqd650eNJor1AgHH54piIf avScMT26lYud6p+I3AJhD+/GsRsX791Kz5vdSoe8E287+0kFgPUy8IPjkkI0hq0gs+2v lP4KSiMe4h+8xMjJDn/d0RMDkUTKimPlfANd7G9bCd6HGP6RRGexzLLh8/0yFRd2G7pe 529A== X-Received: by 10.205.34.145 with SMTP id ss17mr1476986bkb.37.1392969335166; Thu, 20 Feb 2014 23:55:35 -0800 (PST) Received: from localhost (port-15573.pppoe.wtnet.de. [84.46.61.18]) by mx.google.com with ESMTPSA id p5sm6043281bkh.1.2014.02.20.23.55.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Feb 2014 23:55:34 -0800 (PST) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [RFC 03/12] drm/i915: Mark as legacy if KMS is disabled Date: Fri, 21 Feb 2014 08:55:19 +0100 Message-Id: <1392969328-23133-4-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1392969328-23133-1-git-send-email-thierry.reding@gmail.com> References: <1392969328-23133-1-git-send-email-thierry.reding@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Thierry Reding When kernel mode-setting is disabled, mark the driver as legacy to pick up the special semantics required for userspace mode-setting. Signed-off-by: Thierry Reding --- drivers/gpu/drm/i915/i915_drv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 2d05d7ce4c29..ea916e117f01 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -985,13 +985,19 @@ static int __init i915_init(void) #if defined(CONFIG_DRM_I915_KMS) if (i915.modeset != 0) driver.driver_features |= DRIVER_MODESET; + else + driver.driver_features |= DRIVER_LEGACY; #endif if (i915.modeset == 1) driver.driver_features |= DRIVER_MODESET; + else + driver.driver_features |= DRIVER_LEGACY; #ifdef CONFIG_VGA_CONSOLE - if (vgacon_text_force() && i915.modeset == -1) + if (vgacon_text_force() && i915.modeset == -1) { driver.driver_features &= ~DRIVER_MODESET; + driver.driver_features |= DRIVER_LEGACY; + } #endif if (!(driver.driver_features & DRIVER_MODESET)) {