From patchwork Wed Nov 11 18:35:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 324140 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp623129ils; Wed, 11 Nov 2020 10:36:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNY+I5IArAAhzjglmsYwn1Iar1JJtDnhs1zGjARHCtnbIPenueMEP9zyNTxlGPTzFMRjVr X-Received: by 2002:a17:902:d706:b029:d6:c71c:2599 with SMTP id w6-20020a170902d706b02900d6c71c2599mr23641798ply.46.1605119781824; Wed, 11 Nov 2020 10:36:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605119781; cv=none; d=google.com; s=arc-20160816; b=qUT19eHq25LE1yvXylx3kbx+9qoj5CGU3acvT5APMYhvYlHFRN5mpNv6rNCN910Krp zLy+lCnwXdYCzDdLjeEpD+NBLZ+8v577IHmqp4VyJurGRfJ9etbXID6rCFXjL/Mshr1S nSTC9Jir9m3GHYC9sxIrPo94gT8sSgeuwIBuRnD6sU00S+oMGKH8DN72cJyiXkJ86zEr Lky+7iaKx5EsYHaib3wgJd6VjjeW+g2nMq/KQT1eO4DPxnJOa942grxVIgHxwUQzMIYH SNUapr13Kaus/6ILAO8bwRIusSmPn3N273W/riNDjImz1Hd0dXNKIRJ6kUoGxbQg8euF 0d2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=utyctAdZ/UmDrbATP0mZF0kSW1T3/LahIBjjqGxX+p4=; b=tAa3MklHgH8A4Gp1vaK5R+i4zN2nqrtBNbKnQXe7lBUkg8K+414/F83WmLcGqp9wjf MfFQF3blxPbjzpkShOWzyHUqUQQVn+wby3oZVYEV0PgOERnhCdgMvXClhl4naJ7jWic6 YF/Rt9stRH792jhQagTAsiM3dveZYwjQY9roRrSXkgFdjJMLg237fKyNTKZZP0uVIwVY EnsvS1ChLg4GyzfIOipo5pYFSTw0yrm7zEDhNVzz+oRAVcM68UYANJn4+a6dniHu5n4W CToBfcUXj2i7EEowsG3Qe3Kfk8jRqo1HSaQC7uE6N+HIiP7Y5G5CkCF8F+J0hcbx7tO/ 1R1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HTWXyLmb; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id z19si2505591plb.22.2020.11.11.10.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 10:36:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HTWXyLmb; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C22B6E0D0; Wed, 11 Nov 2020 18:36:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4BD066E0C5 for ; Wed, 11 Nov 2020 18:36:06 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id d142so3158773wmd.4 for ; Wed, 11 Nov 2020 10:36:06 -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=q+2/74QrDEEKKJXkOkI83hXV4pIp2Mbn56f+kjUKQmw=; b=HTWXyLmbRrgE4PKmA7/WG+a0iz/P94gk0iGkTjccCVy/t4igMz5c/KjOl+W5iEMFpm oRnVq2a1lcPn6JVUBWZMkgw7mezOKW7eJLebqzp1adFNR0kxGH91hiUt4ypUwmEgBaTM ewBI8uIgWOfYdhJfI26BSk2Hz/sV07h/LmcHrbP6rrVFmQgiv+upd4Orqn6erjuAaWSf wSPjOxmulTrlHxBpZFWhHZ/OhKtPo5OufF/JDnMnbS4e27uI47M4BEM7ycczUnfUUJMo /iAj8eiP0FA2g01MkY+agP870L7Vg9iqCI1zBqkEcTlAFHDc4GgoHfo64C67N80MCVRi zf3Q== 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=q+2/74QrDEEKKJXkOkI83hXV4pIp2Mbn56f+kjUKQmw=; b=aOPqCOi1KUsg4hYf3IR0lOwnXv4RZgE2RqiOXoZ/EoOVKf+UuVXhrpJAumcu/CjzAF RDmynKYLo2IkaYfC3jxB6VnxRhkImeLPM3b3CSw1HcLUN2nlq/IJE9qEOSwm1c/bN1gi muXJPR+O9PaWz3RdDXv6d8bpr/RWPxKv2UZHD1TNdqzkxc30eD7xk5KNn0q+FmL+zioE HYSpRBMuP+aD0OpS0j9wBR4Lix25OhWeiSwsaBMQxrT0NoFr+Pvp13WTeGDsyQ9hBZmy P2IEqiUfFUAiy1ZUxFiZdkVOAv5koOTc2X7+uQO04QqmRIiA0EFo5r0Pd7GWZnBCtqaI pCjw== X-Gm-Message-State: AOAM531nzOyMV7/67kBbZ1OGr5PZYHSvyVb7kSk0gUM+t9MTgbiKcc+i ks2hjT4KRLdsICwURnqh9I88aYfCahYYlQBS X-Received: by 2002:a1c:6654:: with SMTP id a81mr5827678wmc.104.1605119764891; Wed, 11 Nov 2020 10:36:04 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id k84sm3558311wmf.42.2020.11.11.10.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 10:36:04 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 11/19] drm/radeon/radeon_audio: Move 'dce6_*()'s prototypes to shared header Date: Wed, 11 Nov 2020 18:35:37 +0000 Message-Id: <20201111183545.1756994-12-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201111183545.1756994-1-lee.jones@linaro.org> References: <20201111183545.1756994-1-lee.jones@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Slava Grigorev , amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Alex Deucher , =?utf-8?q?Christian_K=C3=B6?= =?utf-8?q?nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/dce6_afmt.c:32:5: warning: no previous prototype for ‘dce6_endpoint_rreg’ [-Wmissing-prototypes] 32 | u32 dce6_endpoint_rreg(struct radeon_device *rdev, | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:46:6: warning: no previous prototype for ‘dce6_endpoint_wreg’ [-Wmissing-prototypes] 46 | void dce6_endpoint_wreg(struct radeon_device *rdev, | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:110:6: warning: no previous prototype for ‘dce6_afmt_select_pin’ [-Wmissing-prototypes] 110 | void dce6_afmt_select_pin(struct drm_encoder *encoder) | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:123:6: warning: no previous prototype for ‘dce6_afmt_write_latency_fields’ [-Wmissing-prototypes] 123 | void dce6_afmt_write_latency_fields(struct drm_encoder *encoder, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:152:6: warning: no previous prototype for ‘dce6_afmt_hdmi_write_speaker_allocation’ [-Wmissing-prototypes] 152 | void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:177:6: warning: no previous prototype for ‘dce6_afmt_dp_write_speaker_allocation’ [-Wmissing-prototypes] 177 | void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:202:6: warning: no previous prototype for ‘dce6_afmt_write_sad_regs’ [-Wmissing-prototypes] 202 | void dce6_afmt_write_sad_regs(struct drm_encoder *encoder, | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:268:6: warning: no previous prototype for ‘dce6_hdmi_audio_set_dto’ [-Wmissing-prototypes] 268 | void dce6_hdmi_audio_set_dto(struct radeon_device *rdev, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:287:6: warning: no previous prototype for ‘dce6_dp_audio_set_dto’ [-Wmissing-prototypes] 287 | void dce6_dp_audio_set_dto(struct radeo_device *rdev, | ^~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Slava Grigorev Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/radeon/dce6_afmt.c | 1 + drivers/gpu/drm/radeon/dce6_afmt.h | 52 +++++++++++++++++++++++++++ drivers/gpu/drm/radeon/radeon_audio.c | 17 +-------- 3 files changed, 54 insertions(+), 16 deletions(-) create mode 100644 drivers/gpu/drm/radeon/dce6_afmt.h diff --git a/drivers/gpu/drm/radeon/dce6_afmt.c b/drivers/gpu/drm/radeon/dce6_afmt.c index eec5d7a627388..4a1d5447eac17 100644 --- a/drivers/gpu/drm/radeon/dce6_afmt.c +++ b/drivers/gpu/drm/radeon/dce6_afmt.c @@ -22,6 +22,7 @@ */ #include +#include "dce6_afmt.h" #include "radeon.h" #include "radeon_audio.h" #include "sid.h" diff --git a/drivers/gpu/drm/radeon/dce6_afmt.h b/drivers/gpu/drm/radeon/dce6_afmt.h new file mode 100644 index 0000000000000..176a538664a27 --- /dev/null +++ b/drivers/gpu/drm/radeon/dce6_afmt.h @@ -0,0 +1,52 @@ +/* dce6_afmt.h -- Private header for radeon driver -*- linux-c -*- + * + * Copyright 2013 Advanced Micro Devices, Inc. + * + * 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 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 + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 __DCE6_AFMT_H__ +#define __DCE6_AFMT_H__ + +struct cea_sad; +struct drm_connector; +struct drm_display_mode; +struct drm_encoder; +struct radeon_crtc; +struct radeon_device; + +u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg); +void dce6_endpoint_wreg(struct radeon_device *rdev, u32 offset, u32 reg, u32 v); +void dce6_afmt_write_sad_regs(struct drm_encoder *encoder, + struct cea_sad *sads, int sad_count); +void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder, + u8 *sadb, int sad_count); +void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder, + u8 *sadb, int sad_count); +void dce6_afmt_write_latency_fields(struct drm_encoder *encoder, + struct drm_connector *connector, + struct drm_display_mode *mode); +void dce6_afmt_select_pin(struct drm_encoder *encoder); +void dce6_hdmi_audio_set_dto(struct radeon_device *rdev, + struct radeon_crtc *crtc, unsigned int clock); +void dce6_dp_audio_set_dto(struct radeon_device *rdev, + struct radeon_crtc *crtc, unsigned int clock); + +#endif /* __DCE6_AFMT_H__ */ diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c index 9d9a5b3251de3..7c5e80d03fc90 100644 --- a/drivers/gpu/drm/radeon/radeon_audio.c +++ b/drivers/gpu/drm/radeon/radeon_audio.c @@ -25,6 +25,7 @@ #include #include +#include "dce6_afmt.h" #include "evergreen_hdmi.h" #include "radeon.h" #include "atom.h" @@ -33,24 +34,8 @@ void dce6_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin, u8 enable_mask); -u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg); -void dce6_endpoint_wreg(struct radeon_device *rdev, - u32 offset, u32 reg, u32 v); -void dce6_afmt_write_sad_regs(struct drm_encoder *encoder, - struct cea_sad *sads, int sad_count); -void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder, - u8 *sadb, int sad_count); -void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder, - u8 *sadb, int sad_count); -void dce6_afmt_write_latency_fields(struct drm_encoder *encoder, - struct drm_connector *connector, struct drm_display_mode *mode); struct r600_audio_pin* r600_audio_get_pin(struct radeon_device *rdev); struct r600_audio_pin* dce6_audio_get_pin(struct radeon_device *rdev); -void dce6_afmt_select_pin(struct drm_encoder *encoder); -void dce6_hdmi_audio_set_dto(struct radeon_device *rdev, - struct radeon_crtc *crtc, unsigned int clock); -void dce6_dp_audio_set_dto(struct radeon_device *rdev, - struct radeon_crtc *crtc, unsigned int clock); static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode); static void radeon_audio_dp_mode_set(struct drm_encoder *encoder,