From patchwork Thu Jul 3 19:27:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilia Mirkin X-Patchwork-Id: 4476701 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 345809F36A for ; Thu, 3 Jul 2014 19:27:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 533512025B for ; Thu, 3 Jul 2014 19:27:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 59A9920254 for ; Thu, 3 Jul 2014 19:27:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 50ABE6E74B; Thu, 3 Jul 2014 12:27:34 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f47.google.com (mail-qg0-f47.google.com [209.85.192.47]) by gabe.freedesktop.org (Postfix) with ESMTP id A4A736E74B; Thu, 3 Jul 2014 12:27:32 -0700 (PDT) Received: by mail-qg0-f47.google.com with SMTP id q108so646969qgd.6 for ; Thu, 03 Jul 2014 12:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=fOIJFCcQ3SwSubs49Rf5tNMBUANLXZ3bGIlOyvvPLqs=; b=YDG17zvZeS0xRo2iAM6YDxJEXbaPmrh1L/6wa8SHazctUxEyi2drVmcC7iFP+QwiPb BmtaPd8La7tE7SihuTXyppu1soh2GfCtOu4Mcn+3hRgXWxEhxTAF733OvR/mIxjNwTO5 dfSoWRLkZRu9V4q87P8dS2PRbsGiX6VkjGMCNrR78dVFBkS8ZDEFt8udoLDkYP1DpQ0s C0tkj5YZ6RWV3BLHNziM9sXdcdOcqmGVZWg3usmCHnL9tA5uMCcgZG2Y0zVfjq8axLb/ 7CJydvzxza+6w52hauvGpPy4MMV4b08Hsz6Qmbfk5Ntg7uQe5eBoHflWtrq4l3qrkkar RViQ== X-Received: by 10.224.111.196 with SMTP id t4mr10814262qap.63.1404415652185; Thu, 03 Jul 2014 12:27:32 -0700 (PDT) Received: from localhost.localdomain (rrcs-50-75-232-238.nyc.biz.rr.com. [50.75.232.238]) by mx.google.com with ESMTPSA id v6sm11557144qat.16.2014.07.03.12.27.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Jul 2014 12:27:31 -0700 (PDT) From: Ilia Mirkin To: Ben Skeggs , nouveau@lists.freedesktop.org Subject: [PATCH] drm: default scaling to NONE for external connectors Date: Thu, 3 Jul 2014 15:27:03 -0400 Message-Id: <1404415623-7198-1-git-send-email-imirkin@alum.mit.edu> X-Mailer: git-send-email 1.8.5.5 Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Signed-off-by: Ilia Mirkin --- Based on a recent discussion in #radeon, and also my own observation that the 'full' scaling causes no end of confusion among users. See https://bugs.freedesktop.org/show_bug.cgi?id=80868 for some more details, although it is more radeon-specific. Side-note: the scaling mode update handler disallows setting the mode to none for LVDS... should it be the same for eDP as well? Or perhaps relax the restriction and let people do whatever they want? drm/nouveau_connector.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drm/nouveau_connector.c b/drm/nouveau_connector.c index 1fa222e..295e222 100644 --- a/drm/nouveau_connector.c +++ b/drm/nouveau_connector.c @@ -1192,6 +1192,8 @@ nouveau_connector_create(struct drm_device *dev, int index) disp->color_vibrance_property, 150); + nv_connector->scaling_mode = DRM_MODE_SCALE_NONE; + switch (nv_connector->type) { case DCB_CONNECTOR_VGA: if (nv_device(drm->device)->card_type >= NV_50) { @@ -1203,10 +1205,11 @@ nouveau_connector_create(struct drm_device *dev, int index) case DCB_CONNECTOR_TV_0: case DCB_CONNECTOR_TV_1: case DCB_CONNECTOR_TV_3: - nv_connector->scaling_mode = DRM_MODE_SCALE_NONE; break; default: - nv_connector->scaling_mode = DRM_MODE_SCALE_FULLSCREEN; + if (type == DRM_MODE_CONNECTOR_LVDS || + type == DRM_MODE_CONNECTOR_eDP) + nv_connector->scaling_mode = DRM_MODE_SCALE_FULLSCREEN; drm_object_attach_property(&connector->base, dev->mode_config.scaling_mode_property,