From patchwork Mon Nov 16 17:36:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 324465 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp3503623ils; Mon, 16 Nov 2020 09:38:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/7yopf4etHVL3L3YFLzKO4DmiAqwzHhf9PJvC1cbvkFu0Kjcc6fHFLQumqKfw8eXsNo0D X-Received: by 2002:a65:420c:: with SMTP id c12mr254173pgq.53.1605548287766; Mon, 16 Nov 2020 09:38:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605548287; cv=none; d=google.com; s=arc-20160816; b=Stdwsq5mf1z/REu0Coa8nta6Nn97w9HPxLf1kbdd81rQQIv1RvfrsSoWFfhST9b2eB pxRpoXOC8mDZEx7C46ElO8YTt/EsBGsniAFn4gTQTQDCCxd5hd/iXuqNJ/0fr9bhLY89 3/Pu+t8RUAwgmFro0SqNMLB0egAvc6FGVEgzVqwt8E7Oe5EHDWCcATXwrFEu4SKYLHaq ESi2rI4S3qmvhqsQD9pgUcHyQ9h1R9ihIZW0XQge6P+bMD3Otq5dugODMYTnfub/gDnr aaavnZ6UVYHZaXHp5f0emb1TfD7nXA0JS5jd0K+842cCMa6/HSmTb1amceS5q96F3ote aiyw== 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=aB+vXRSe3/Je2MQBsnrw07ZLT9mkzl8KaHGP9Luq5fM=; b=CuqGcFATQAVNEIp97hklFlicfJ68JeVfG3VdXGzLYIHe1YSVK2bAmvJEa+fPldPzco ZGsDQRJ4rVVTQjqAQ1AfUYJmURMHAMa3nqxaMFDGUgSqYd5azpLUx0b+iMFSXypJsHWo /5ay8W6k7cmYLwuF7EgNc7522OSgULcwN54AgnEdVaiulvBzxQN5S7DS99QLcGAnKFrw Cs5k6UYhrrQMR5pp556HY71Tr9eSZC3bqOCtC6J4iV7UZWADAGHUVkrbSUV/Y7D2LfTm ZByzKeZt5Imvmehj1umxRZzKvsNLZwgQSrWokse3HuGmlbEciiZyco6bM90igXkhZ6bj 4amg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=dijXs9Qi; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id g6si17140851plp.197.2020.11.16.09.38.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:38:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=dijXs9Qi; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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 EA7636E9E1; Mon, 16 Nov 2020 17:37:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id C64A26E061 for ; Mon, 16 Nov 2020 17:37:50 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id d12so19598923wrr.13 for ; Mon, 16 Nov 2020 09:37:50 -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=iA8Mvpk+iDAEBWD7dp99arFLgzTdygtvzraETkCMvqc=; b=dijXs9QiY2YXee7k4ar4kZpC/iWAoR/rUJaCG/bm3xdVuD56N7C4g2AbD8l6Rg1F5I h/beRtehlTdiOWth53tPXNugomaBdkgnhwc+OIwP2ppTAR82r9TWy+dNU/tvjJ1hryOl F9U4CG8GWwCQFEXGp9TZv0LJOHDnldMrO7yB5HhBCwWZFY2yt1+yiiG8tzrXxfd0PtB4 x/2+eZjAB1JQbGHmZOyi9BmYaLUaN1H29pJ8ejLS2fPn1DIfYotLyuNytcIv0ee+CeKg KWnpaI5bARlLKgtQ61kjceE1PZaRc8z/5iJtMTJ8+gq7T5IuoW2AMHscNnMLssfGLE3/ bMiQ== 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=iA8Mvpk+iDAEBWD7dp99arFLgzTdygtvzraETkCMvqc=; b=hygr4oTca9dthq8ebgzo/cyDQs1elNKsJKaEKANkGlhC+B7AceOxAwhCklVtByv8vE V7EMH4F309iX84RCJTgcLhQkRRIw25vt613832HpjTLlRkkDdacZPrfc1y0OM1ArSqUF DOCJxj1yAiAoZ78OuwqeIN5chX2qJnOOfGXAfqyJNjY95GFlyColLIdjN8t1wfLYO2ng BrcPZmfuqOEOBCcMaPGyTOqdxduUpy1N7q4IdlJH4/JZbW1+ui2lO+Yx7M3/iFEGY5xl iij+m/uSpZPurNv69Okoon03QVQ1ZzMbwFPROQFfH5RtwgxbfQbi2JKkHnm15OwTT6xi uHzw== X-Gm-Message-State: AOAM5306bTh4Q16nmMYdDGiGHwuLqvWxe1+uct4cBP8n4zKTQyGA81yQ QjCZvbjh+KdDDGs1pm+Ey2JFVQ== X-Received: by 2002:adf:cf0b:: with SMTP id o11mr20099999wrj.162.1605548269524; Mon, 16 Nov 2020 09:37:49 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id 30sm16942828wrd.88.2020.11.16.09.37.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:37:48 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 33/43] drm/radeon/radeon_audio: Move 'dce6_*()'s prototypes to shared header Date: Mon, 16 Nov 2020 17:36:50 +0000 Message-Id: <20201116173700.1830487-34-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201116173700.1830487-1-lee.jones@linaro.org> References: <20201116173700.1830487-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 3cc53db04d645..785c23cb30589 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" @@ -34,26 +35,10 @@ void r600_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin, u8 enable_mask); 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 r600_hdmi_audio_set_dto(struct radeon_device *rdev, struct radeon_crtc *crtc, unsigned int clock); -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); void r600_set_avi_packet(struct radeon_device *rdev, u32 offset, unsigned char *buffer, size_t size); void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,