Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4158ybl; Tue, 7 Jan 2020 13:00:03 -0800 (PST) X-Google-Smtp-Source: APXvYqzWOzWtYpyEn0uHkcW/cAM6cosYMC90DysRTsszyJh50RmfWnDMgGJHr/fp2sTxk4GZ5IK/ X-Received: by 2002:a05:6830:2053:: with SMTP id f19mr1571538otp.193.1578430803023; Tue, 07 Jan 2020 13:00:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578430803; cv=none; d=google.com; s=arc-20160816; b=nmff+03iSkavAZIPIpfGEOI/HxSSHkobxpa4WxhuZNuaGhkNO+ayJF4LmWGoSwUk9x JGoBrzB53dcT+X5hEGWHpLq9QVR4JX/pxKGnexH+ttRZ3eJDl11xSemadTA+lOmQKsJ7 ZoPf+95b3Bp2xS+AHYwmoxXK+h4AUSz+3hx9DJSOxAJ3YWZ9SbVY+RNeyP57uO6RPWbY gEixasMKT0fWv7L1ymFqq5XEFMCxC8lernUBcbYlzUAS5s1vrb7CYFJYCF+CNb3z7u5G jkQC3zylvsgy9A+rbuVyYXCpiBBZq1/QwsBXiP+nQH8MPmvfFuYg9ffFrtMTGI+rfGZ2 z3KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Vhwjny/E2hLJbvfGl2rpI4fby3r69hPsvSZtTaXk+ow=; b=AsYvDU0aeLCYdiES8V171605NFeTaNEpD6NhMcUf+HQYToL+O6hjAMsfhEFlx4TKEU X03z9cGaHqwq8gMfHdavT8KKoQWTq86CXVf68GvpkaZvkzPXXb0OJ1YfLBucHZey73z9 +uD8OTtRD8q1qLsHG2t8bwzea/e15/OeXpkzcC50FFTIJLXBV0bqDnMV1xnpY1FN/IhX 7W7YQZaTL/JVkynT4e5kk7r5a0uqVBZ+Cd5jTxA48fBj/m3JactPJTsCQsqYyhNToA50 BL/NUkMGA+5r5cR1fhMXZUM9NVsXIqYxGLCKWPLDbsptPPaaYWBh7f9wTVBwqq2FZygF 1Wig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Uww4aU8T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si494007otl.229.2020.01.07.12.59.50; Tue, 07 Jan 2020 13:00:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Uww4aU8T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727591AbgAGU51 (ORCPT + 99 others); Tue, 7 Jan 2020 15:57:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:54378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727562AbgAGU5X (ORCPT ); Tue, 7 Jan 2020 15:57:23 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 49E432081E; Tue, 7 Jan 2020 20:57:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578430642; bh=l6nEf4vQfBED9d1RXxUJd2BaekDpRFJovsar23ILT6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uww4aU8TMgDOptgcUen4hMeLe+e0Vq/fGbHRtJpQD9W1+doHmjEPPWlyeBucyQX+3 +TieFEmHNViEXkQOzhWCqTLiTkBs9F7E8kT1fwI+V5L88zHn4eYGFj5bHTszICr0TZ OY/5wNK+gix6DwROG75Mwk4R0fj7//Y9+FLyV0OU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Lyude Paul , Ben Skeggs , Sasha Levin Subject: [PATCH 5.4 036/191] drm/nouveau: Move the declaration of struct nouveau_conn_atom up a bit Date: Tue, 7 Jan 2020 21:52:36 +0100 Message-Id: <20200107205334.929300882@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200107205332.984228665@linuxfoundation.org> References: <20200107205332.984228665@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ Upstream commit 37a68eab4cd92b507c9e8afd760fdc18e4fecac6 ] Place the declaration of struct nouveau_conn_atom above that of struct nouveau_connector. This commit makes no changes to the moved block what so ever, it just moves it up a bit. This is a preparation patch to fix some issues with connector handling on pre nv50 displays (which do not use atomic modesetting). Signed-off-by: Hans de Goede Reviewed-by: Lyude Paul Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin --- drivers/gpu/drm/nouveau/nouveau_connector.h | 110 ++++++++++---------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.h b/drivers/gpu/drm/nouveau/nouveau_connector.h index f43a8d63aef8..de9588420884 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.h +++ b/drivers/gpu/drm/nouveau/nouveau_connector.h @@ -29,6 +29,7 @@ #include +#include #include #include #include @@ -44,6 +45,60 @@ struct dcb_output; struct nouveau_backlight; #endif +#define nouveau_conn_atom(p) \ + container_of((p), struct nouveau_conn_atom, state) + +struct nouveau_conn_atom { + struct drm_connector_state state; + + struct { + /* The enum values specifically defined here match nv50/gf119 + * hw values, and the code relies on this. + */ + enum { + DITHERING_MODE_OFF = 0x00, + DITHERING_MODE_ON = 0x01, + DITHERING_MODE_DYNAMIC2X2 = 0x10 | DITHERING_MODE_ON, + DITHERING_MODE_STATIC2X2 = 0x18 | DITHERING_MODE_ON, + DITHERING_MODE_TEMPORAL = 0x20 | DITHERING_MODE_ON, + DITHERING_MODE_AUTO + } mode; + enum { + DITHERING_DEPTH_6BPC = 0x00, + DITHERING_DEPTH_8BPC = 0x02, + DITHERING_DEPTH_AUTO + } depth; + } dither; + + struct { + int mode; /* DRM_MODE_SCALE_* */ + struct { + enum { + UNDERSCAN_OFF, + UNDERSCAN_ON, + UNDERSCAN_AUTO, + } mode; + u32 hborder; + u32 vborder; + } underscan; + bool full; + } scaler; + + struct { + int color_vibrance; + int vibrant_hue; + } procamp; + + union { + struct { + bool dither:1; + bool scaler:1; + bool procamp:1; + }; + u8 mask; + } set; +}; + struct nouveau_connector { struct drm_connector base; enum dcb_connector_type type; @@ -121,61 +176,6 @@ extern int nouveau_ignorelid; extern int nouveau_duallink; extern int nouveau_hdmimhz; -#include -#define nouveau_conn_atom(p) \ - container_of((p), struct nouveau_conn_atom, state) - -struct nouveau_conn_atom { - struct drm_connector_state state; - - struct { - /* The enum values specifically defined here match nv50/gf119 - * hw values, and the code relies on this. - */ - enum { - DITHERING_MODE_OFF = 0x00, - DITHERING_MODE_ON = 0x01, - DITHERING_MODE_DYNAMIC2X2 = 0x10 | DITHERING_MODE_ON, - DITHERING_MODE_STATIC2X2 = 0x18 | DITHERING_MODE_ON, - DITHERING_MODE_TEMPORAL = 0x20 | DITHERING_MODE_ON, - DITHERING_MODE_AUTO - } mode; - enum { - DITHERING_DEPTH_6BPC = 0x00, - DITHERING_DEPTH_8BPC = 0x02, - DITHERING_DEPTH_AUTO - } depth; - } dither; - - struct { - int mode; /* DRM_MODE_SCALE_* */ - struct { - enum { - UNDERSCAN_OFF, - UNDERSCAN_ON, - UNDERSCAN_AUTO, - } mode; - u32 hborder; - u32 vborder; - } underscan; - bool full; - } scaler; - - struct { - int color_vibrance; - int vibrant_hue; - } procamp; - - union { - struct { - bool dither:1; - bool scaler:1; - bool procamp:1; - }; - u8 mask; - } set; -}; - void nouveau_conn_attach_properties(struct drm_connector *); void nouveau_conn_reset(struct drm_connector *); struct drm_connector_state * -- 2.20.1