From patchwork Fri Nov 6 21:49:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 321625 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C624FC55178 for ; Fri, 6 Nov 2020 21:50:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 714AC2078B for ; Fri, 6 Nov 2020 21:50:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eXZxFJ0D" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728753AbgKFVuw (ORCPT ); Fri, 6 Nov 2020 16:50:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728729AbgKFVuH (ORCPT ); Fri, 6 Nov 2020 16:50:07 -0500 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44A99C0613CF for ; Fri, 6 Nov 2020 13:50:07 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id p22so2839293wmg.3 for ; Fri, 06 Nov 2020 13:50:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xaVwrMr6e/jbnTc5qGRYSEriQiljvoWqO6b2JcTWvj4=; b=eXZxFJ0DJnXnG4PTRnW4zbY40yCi26ZRguq8FgTlJbA5SNWLBT9jWR5zy1R2sUX1TM CMHOP+N7nrftop8HRYZB+EagLdSwgk3Z/SXWWqj/O97kqn1n+TDDyqo8b0KoNy3bReyb HPe4pHgcNYeo3m2J+aH4PH4Lc+6HNLQwlmWJ1Yqo5OXuPcc336PxwRnc7u3uPpoqoeQm EcbvtA9V1xc983pr9fJX2OQTH+ogpHZKb4opW6oKP9iDkH2ZS+wUuhPTYB4AH4SQRTiJ i7HVBe4elFUAD88VJK0DZAAZSjIQE0ehoP3LF/KWBD7ru9eGI0jGKdsWChjT9uWyOavh emoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xaVwrMr6e/jbnTc5qGRYSEriQiljvoWqO6b2JcTWvj4=; b=VVlqlRsAYirjEYTBEsPuKpcjzdasAzzR1TXE5WOqFK8CmibvjOeAB2fCMtVwFl0Yxj qNECHHZdZUcmJHkT4MlLyXy4ej7SFiTEl+IoQWl2nMwAxFs4IDljycVuuF+A2Hmh17VY /oaz/RpjIn/wwgoNovMMs9cQ8GPb3nOh7tH5s7ZqwhA3SZ4yIlxH4EEjh8CyaGzfY45o zNXs1pPu+z1+3IxG8RkgSW9it9ZQ/chw5tmwJ7bCIj5ZuUDYSGd0tuw//Zc4zc1oBvhW wRYf5fQsGw2sxFvUewYRqDzYZWaAacN9qLXCFA+GTJa8FvunngyOaEy65sGg80vde9eV CPZA== X-Gm-Message-State: AOAM531NWD2AX1gkAxVEsVG/fbe84HtWZt0cSneG9hgLcay8ZAYAhyqK 7s+4Eq0nfFoNYt3ag0ULVOXMSA== X-Google-Smtp-Source: ABdhPJxTmyerXkl8RR0eJrnwM1v2u23YYZVK3Ps71Ip7mBI6xQdbKTgb9Ow5+TUh5vKokN7ikvoPkg== X-Received: by 2002:a1c:5605:: with SMTP id k5mr1502624wmb.99.1604699406015; Fri, 06 Nov 2020 13:50:06 -0800 (PST) Received: from dell.default ([91.110.221.236]) by smtp.gmail.com with ESMTPSA id t199sm3981084wmt.46.2020.11.06.13.50.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Nov 2020 13:50:05 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, Alex Deucher , =?utf-8?q?Christian_K=C3=B6n?= =?utf-8?q?ig?= , David Airlie , Daniel Vetter , Sumit Semwal , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org Subject: [PATCH 10/19] drm/radeon/radeon: Move prototype into shared header Date: Fri, 6 Nov 2020 21:49:40 +0000 Message-Id: <20201106214949.2042120-11-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201106214949.2042120-1-lee.jones@linaro.org> References: <20201106214949.2042120-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Unfortunately, a suitable one didn't already exist. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_device.c:637:6: warning: no previous prototype for ‘radeon_device_is_virtual’ [-Wmissing-prototypes] 637 | bool radeon_device_is_virtual(void) | ^~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones --- drivers/gpu/drm/radeon/radeon_device.c | 1 + drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++++++++++++++++++++++ drivers/gpu/drm/radeon/radeon_drv.c | 3 +-- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/radeon/radeon_device.h diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 7f384ffe848a7..ad572f965190b 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -42,6 +42,7 @@ #include #include +#include "radeon_device.h" #include "radeon_reg.h" #include "radeon.h" #include "atom.h" diff --git a/drivers/gpu/drm/radeon/radeon_device.h b/drivers/gpu/drm/radeon/radeon_device.h new file mode 100644 index 0000000000000..c8e6dd2005224 --- /dev/null +++ b/drivers/gpu/drm/radeon/radeon_device.h @@ -0,0 +1,32 @@ +/* radeon_drv.h -- Private header for radeon device -*- linux-c -*- + * + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. + * Copyright 2000 VA Linux Systems, Inc., Fremont, California. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifndef __RADEON_DEV_H__ +#define __RADEON_DEV_H__ + +bool radeon_device_is_virtual(void); + +#endif /* __RADEON_DEV_H__ */ diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index f5f1cb700d873..560267cc25892 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -51,6 +51,7 @@ #include #include "radeon_drv.h" +#include "radeon_device.h" /* * KMS wrapper. @@ -300,8 +301,6 @@ MODULE_DEVICE_TABLE(pci, pciidlist); static struct drm_driver kms_driver; -bool radeon_device_is_virtual(void); - static int radeon_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { From patchwork Fri Nov 6 21:49:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 320848 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1657094ilc; Fri, 6 Nov 2020 13:50:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJyb/hTzD8ekczWH4v+Yd8trvnOuwI5Tv4Vrp5ietRzbl2OvhqfZRBYhZFsVQp36FCkdST5O X-Received: by 2002:a17:906:2f10:: with SMTP id v16mr4025032eji.320.1604699416513; Fri, 06 Nov 2020 13:50:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604699416; cv=none; d=google.com; s=arc-20160816; b=T6YA3/BFZmjG3i7AJgR8cXcnbf3pITetVIOnKVjjz2Qiv8y/8ltHq7EP9HJxL2LVRq Bu8PIJd/vMx5JyeefJluVqHZ9HcBNWWE089QUUeiv9LblkkJQ/DFxrQlyc6lsszt5yqd JoGC17pxaCzCZSNTB+hHYxm4E7SpDgSHif+22ndCaS7L6bUlzyRWDpnHWs3LQRBIphiw Ow/g1QmUc1F0VFdZXyc1yCCM1DCHiubmTsZCsohkmCi6ZTI9pRvnIWJYIHCQIj2JHWRy 4Ng6NuprnmPFbsHvfcyUKv5aklCKJ8zhV2KhG8FOw/MllCDU2DttKpIihHL5Fb2Bde0K h3jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XN+cgxXjY3IWekASuJPYqV0dOA81c47vUDG0BBQb6c0=; b=r5gJLOjGRJHUwH6D1JsDXQhhR+t0RUDICRIVCDXgH3qPRlfTje8GJ5tMkjyD2QPVz/ GsH5cObNSTpLjJ/LITAd1gD+K4Eenzlr8y1TOs0jWqcQs9QTYuCJzd7XnQyrwcwEEEmG USUiJCP//PtvT1yfnqxH9+RceMDnMWNOFq6xz7+GPGTLr+LpICB/lFUhgFjGi3RXxqGW 3wDo03yhSBAjiLK72z3KObFlb3ZBS1TWG8rBjADET+ngMzPBcmxiVJOsB2M7U+PCb7U0 72YGVoV2ISWcWY5jNNp0yKgJz/D6DwrPaqF92n01bU7MsCeae9n+BWCVKFdweSBGUldM N0EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HCGvUbcx; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k20si1619628ejj.93.2020.11.06.13.50.16; Fri, 06 Nov 2020 13:50:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HCGvUbcx; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728792AbgKFVuP (ORCPT + 4 others); Fri, 6 Nov 2020 16:50:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728789AbgKFVuP (ORCPT ); Fri, 6 Nov 2020 16:50:15 -0500 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E1CCC0613CF for ; Fri, 6 Nov 2020 13:50:13 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id g12so2772472wrp.10 for ; Fri, 06 Nov 2020 13:50:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XN+cgxXjY3IWekASuJPYqV0dOA81c47vUDG0BBQb6c0=; b=HCGvUbcx5ZEN2tfKGwHJicVvv+pm5x43BHYd0mWRsxxz1IOqVirgnGczw7oawgtQXB 7UygpB7ndYtvwbAuuhuaC6Qb2sfQK60p1OUOxbmCjKhcxzjmmm4TTDd1LFZtaWUZIudH GCsTzPE/zuBUGTLoiaFz52M0clHGNBXnsdLFW2mOxaO0RaV/pUYsX07zEX7Z0XNI/n1q AgU2ChqZX7giA7oo56qtWu8HkTrMDdt2oxJk+AYpkaHiYP0Ns4cEFV9WglGGP6sGMmVL FmVkjlPKqeawp62wfvotAn2I65hfXYwautS3PIWf0NqQV4Ei7ry86OU7eRNamQLgA1q1 3crg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XN+cgxXjY3IWekASuJPYqV0dOA81c47vUDG0BBQb6c0=; b=M1W3FcTQRb4qBgJoYLV8jBcywpXghPXiAMmDm9B0iVkqbkEm9gRKtwXJL9dpNZiOTd Hh+Z9sSurenu/YiQw3dAl3Tsh9RTj04USNPQo2E32zkuFTibkGKQesx3XQWlQAddp2Ip IuA3C9m6TIHbvf4GaQ7wG+qqvpzLJwoltZO4rJEVOgfyX4O+NiuyF1COe//qZDb+C+Aa p50riLz2ufJi3A87VdNwPj1fwXKUYcI54+6Kb+OQruHrIm+sYgkpIo4/5ZyHfNMg73dw i7DrQKY7ujmAtLr0uVBWS45pNkYFkBFUXr4cfvM1MOt8DMLmYNLdc9FgR31NN3r0XvRN Tx9Q== X-Gm-Message-State: AOAM533zpi9L/d4Iz3Yguv3imTednksD+VAcCL+ym0qDP+gCfKsiqzo8 88LmmVsqlhFPVlTFek8SiS2M3Q== X-Received: by 2002:a5d:4001:: with SMTP id n1mr4927117wrp.426.1604699412401; Fri, 06 Nov 2020 13:50:12 -0800 (PST) Received: from dell.default ([91.110.221.236]) by smtp.gmail.com with ESMTPSA id t199sm3981084wmt.46.2020.11.06.13.50.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Nov 2020 13:50:11 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, Alex Deucher , =?utf-8?q?Christian_K=C3=B6n?= =?utf-8?q?ig?= , David Airlie , Daniel Vetter , Sumit Semwal , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org Subject: [PATCH 15/19] drm/radeon: Move prototypes to shared header Date: Fri, 6 Nov 2020 21:49:45 +0000 Message-Id: <20201106214949.2042120-16-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201106214949.2042120-1-lee.jones@linaro.org> References: <20201106214949.2042120-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_kms.c:756:5: warning: no previous prototype for ‘radeon_get_vblank_counter_kms’ [-Wmissing-prototypes] 756 | u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kms.c:826:5: warning: no previous prototype for ‘radeon_enable_vblank_kms’ [-Wmissing-prototypes] 826 | int radeon_enable_vblank_kms(struct drm_crtc *crtc) | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kms.c:853:6: warning: no previous prototype for ‘radeon_disable_vblank_kms’ [-Wmissing-prototypes] 853 | void radeon_disable_vblank_kms(struct drm_crtc *crtc) | ^~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones --- drivers/gpu/drm/radeon/radeon.h | 6 ++++++ drivers/gpu/drm/radeon/radeon_display.c | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) -- 2.25.1 diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index e1132d86d2507..961a31b8805c2 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -2832,6 +2832,12 @@ extern void radeon_program_register_sequence(struct radeon_device *rdev, const u32 array_size); struct radeon_device *radeon_get_rdev(struct ttm_bo_device *bdev); +/* KMS */ + +u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc); +int radeon_enable_vblank_kms(struct drm_crtc *crtc); +void radeon_disable_vblank_kms(struct drm_crtc *crtc); + /* * vm */ diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index b79686cf8bdbd..bd60f16fd0d78 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -45,10 +45,6 @@ #include "atom.h" #include "radeon.h" -u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc); -int radeon_enable_vblank_kms(struct drm_crtc *crtc); -void radeon_disable_vblank_kms(struct drm_crtc *crtc); - static void avivo_crtc_load_lut(struct drm_crtc *crtc) { struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);