From patchwork Wed Dec 26 21:03:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10743293 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5A0796C2 for ; Wed, 26 Dec 2018 21:04:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A38B286D4 for ; Wed, 26 Dec 2018 21:04:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B69D28701; Wed, 26 Dec 2018 21:04:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,URIBL_RHS_DOB autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DF056286D4 for ; Wed, 26 Dec 2018 21:04:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EA3C16E101; Wed, 26 Dec 2018 21:04:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id A02356E0BA for ; Wed, 26 Dec 2018 21:04:38 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id q2-v6so14702584lji.10 for ; Wed, 26 Dec 2018 13:04:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=EuxKM+L8goMIZAgnpg5Zp++orBI8BY79job/7famgVo=; b=PStDCtUaYwG0yGXjI29ZT6ylzpvFHBNO78kCRuaIxLLQKI3fAa70HBVtzH1A2tDZyl mqBwKl7xTw6QQyDTr3sFmQl9uDnzkRptiS+PTdV78mWj2EXma/hzlQzOLPwGrEEJWhCY qe5PYqdC6ZZ2x45iBLaRbTQEnaav3p/8JCLqQ2pM6aBA66/HdxalJXR++nIa5q65q3UX RFgp3xastpjW1X8eLLjXDII0KmutEyBLVZj4SSrKC54KRjIzx4Xkr32bB45XaZFt5G3l bnvCDBMIwCzBP5bFxdfNTjuIEZ960R1hDOsSVCyPcjNKVswpnSt/NPNRd5yzVSv2BXMp G2ug== X-Gm-Message-State: AJcUukdCwLOOSVgRZvuFlJWNltiRI0k8ZFqwCkzQe0mX2xNFp3BJBORT pzkesmjqWRQvmGrOSg/1QdI= X-Google-Smtp-Source: ALg8bN5U/nD1KODcHS70RxFtPxfi8p68K1oKZu6P6glo57RbTqYBkg3hY67OVbYARBWdX6iqAutT3w== X-Received: by 2002:a2e:8546:: with SMTP id u6-v6mr11827020ljj.95.1545858277083; Wed, 26 Dec 2018 13:04:37 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id g70-v6sm7768124ljg.92.2018.12.26.13.04.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Dec 2018 13:04:36 -0800 (PST) From: Sam Ravnborg To: Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Sean Paul , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v1 2/7] drm: move DRM_SWITCH_POWER defines to drm_device.h Date: Wed, 26 Dec 2018 22:03:48 +0100 Message-Id: <20181226210353.13993-2-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20181226210215.GA27610@ravnborg.org> References: <20181226210215.GA27610@ravnborg.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sam Ravnborg MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Move DRM_SWITCH_POWER out of drmP.h to allow users to get rid of the drmP include. DRM_SWITCH_POWER defines are used in combination with drm_device.switch_power_state. Move the DRM_SWITCH_POWER defines to the file where drm_device.switch_power_state is defined. Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Sam Ravnborg --- include/drm/drmP.h | 5 ----- include/drm/drm_device.h | 9 +++++++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/drm/drmP.h b/include/drm/drmP.h index b6b8436b5123..2ba786820052 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -95,11 +95,6 @@ struct dma_buf_attachment; struct pci_dev; struct pci_controller; -#define DRM_SWITCH_POWER_ON 0 -#define DRM_SWITCH_POWER_OFF 1 -#define DRM_SWITCH_POWER_CHANGING 2 -#define DRM_SWITCH_POWER_DYNAMIC_OFF 3 - /* returns true if currently okay to sleep */ static inline bool drm_can_sleep(void) { diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h index 42411b3ea0c8..c3da194d25f9 100644 --- a/include/drm/drm_device.h +++ b/include/drm/drm_device.h @@ -24,6 +24,13 @@ struct inode; struct pci_dev; struct pci_controller; + +/* Used by drm_device.switch_power_state */ +#define DRM_SWITCH_POWER_ON 0 +#define DRM_SWITCH_POWER_OFF 1 +#define DRM_SWITCH_POWER_CHANGING 2 +#define DRM_SWITCH_POWER_DYNAMIC_OFF 3 + /** * DRM device structure. This structure represent a complete card that * may contain multiple heads. @@ -222,6 +229,8 @@ struct drm_device { struct idr object_name_idr; struct drm_vma_offset_manager *vma_offset_manager; /*@} */ + + /* See DRM_SWITCH_POWER defines */ int switch_power_state; /**