Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/amd/display/dc amdgpu: Remove...
details: https://anonhg.NetBSD.org/src/rev/f8af9d816cff
branches: trunk
changeset: 1028772:f8af9d816cff
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:59:30 2021 +0000
description:
amdgpu: Remove local ifdefs caused by audio.h header file confusion.
diffstat:
sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc.c | 6 +-
sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc_link_hwss.c | 8 +--
sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc_resource.c | 18 +-------
sys/external/bsd/drm2/dist/drm/amd/display/dc/dce/dce_audio.h | 6 +--
sys/external/bsd/drm2/dist/drm/amd/display/dc/dce100/amdgpu_dce100_resource.c | 12 +----
sys/external/bsd/drm2/dist/drm/amd/display/dc/dce110/amdgpu_dce110_hw_sequencer.c | 22 +---------
sys/external/bsd/drm2/dist/drm/amd/display/dc/dce110/amdgpu_dce110_resource.c | 14 +-----
sys/external/bsd/drm2/dist/drm/amd/display/dc/dce112/amdgpu_dce112_resource.c | 15 +-----
sys/external/bsd/drm2/dist/drm/amd/display/dc/dce120/amdgpu_dce120_resource.c | 16 +------
sys/external/bsd/drm2/dist/drm/amd/display/dc/dce80/amdgpu_dce80_resource.c | 14 +-----
sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn10/amdgpu_dcn10_hw_sequencer.c | 8 +--
sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn10/amdgpu_dcn10_resource.c | 16 +------
sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_hwseq.c | 6 +-
sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c | 16 +------
sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn21/amdgpu_dcn21_resource.c | 10 +---
15 files changed, 29 insertions(+), 158 deletions(-)
diffs (truncated from 1001 to 300 lines):
diff -r f65a125ba865 -r f8af9d816cff sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc.c
--- a/sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc.c Sun Dec 19 11:59:19 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc.c Sun Dec 19 11:59:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdgpu_dc.c,v 1.3 2021/12/19 10:59:01 riastradh Exp $ */
+/* $NetBSD: amdgpu_dc.c,v 1.4 2021/12/19 11:59:30 riastradh Exp $ */
/*
* Copyright 2015 Advanced Micro Devices, Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_dc.c,v 1.3 2021/12/19 10:59:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_dc.c,v 1.4 2021/12/19 11:59:30 riastradh Exp $");
#include <linux/slab.h>
#include <linux/mm.h>
@@ -2113,10 +2113,8 @@
if (*stream_update->dpms_off) {
core_link_disable_stream(pipe_ctx);
/* for dpms, keep acquired resources*/
-#ifndef __NetBSD__ /* XXX amdgpu audio */
if (pipe_ctx->stream_res.audio && !dc->debug.az_endpoint_mute_only)
pipe_ctx->stream_res.audio->funcs->az_disable(pipe_ctx->stream_res.audio);
-#endif
dc->hwss.optimize_bandwidth(dc, dc->current_state);
} else {
diff -r f65a125ba865 -r f8af9d816cff sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc_link_hwss.c
--- a/sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc_link_hwss.c Sun Dec 19 11:59:19 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc_link_hwss.c Sun Dec 19 11:59:30 2021 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: amdgpu_dc_link_hwss.c,v 1.3 2021/12/19 10:59:01 riastradh Exp $ */
+/* $NetBSD: amdgpu_dc_link_hwss.c,v 1.4 2021/12/19 11:59:30 riastradh Exp $ */
/* Copyright 2015 Advanced Micro Devices, Inc. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_dc_link_hwss.c,v 1.3 2021/12/19 10:59:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_dc_link_hwss.c,v 1.4 2021/12/19 11:59:30 riastradh Exp $");
#include "dm_services.h"
#include "dc.h"
@@ -334,10 +334,8 @@
dp_receiver_power_ctrl(link, false);
link->dc->hwss.disable_stream(&pipes[i]);
-#ifndef __NetBSD__ /* XXX amdgpu audio */
if ((&pipes[i])->stream_res.audio && !link->dc->debug.az_endpoint_mute_only)
(&pipes[i])->stream_res.audio->funcs->az_disable((&pipes[i])->stream_res.audio);
-#endif
link->link_enc->funcs->disable_output(
link->link_enc,
@@ -359,7 +357,6 @@
link->dc->hwss.unblank_stream(&pipes[i],
link_setting);
-#ifndef __NetBSD__ /* XXX amdgpu audio */
if (pipes[i].stream_res.audio) {
/* notify audio driver for
* audio modes of monitor */
@@ -373,7 +370,6 @@
audio_mute_control(
pipes[i].stream_res.stream_enc, false);
}
-#endif
}
}
}
diff -r f65a125ba865 -r f8af9d816cff sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc_resource.c
--- a/sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc_resource.c Sun Dec 19 11:59:19 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc_resource.c Sun Dec 19 11:59:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdgpu_dc_resource.c,v 1.4 2021/12/19 10:59:36 riastradh Exp $ */
+/* $NetBSD: amdgpu_dc_resource.c,v 1.5 2021/12/19 11:59:30 riastradh Exp $ */
/*
* Copyright 2012-15 Advanced Micro Devices, Inc.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_dc_resource.c,v 1.4 2021/12/19 10:59:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_dc_resource.c,v 1.5 2021/12/19 11:59:30 riastradh Exp $");
#include <linux/slab.h>
@@ -209,7 +209,6 @@
}
}
-#ifndef __NetBSD__ /* XXX amdgpu audio */
static void update_num_audio(
const struct resource_straps *straps,
unsigned int *num_audio,
@@ -236,7 +235,6 @@
DC_ERR("DC: unexpected audio fuse!\n");
}
}
-#endif
bool resource_construct(
unsigned int num_virtual_links,
@@ -254,9 +252,6 @@
create_funcs->read_dce_straps(dc->ctx, &straps);
pool->audio_count = 0;
-#ifdef __NetBSD__ /* XXX amdgpu audio */
- __USE(num_audio);
-#else
if (create_funcs->create_audio) {
/* find the total number of streams available via the
* AZALIA_F0_CODEC_PIN_CONTROL_RESPONSE_CONFIGURATION_DEFAULT
@@ -281,7 +276,6 @@
pool->audio_count++;
}
}
-#endif
pool->stream_enc_count = 0;
if (create_funcs->create_stream_encoder) {
@@ -1668,7 +1662,6 @@
return -1;
}
-#ifndef __NetBSD__ /* XXX amdgpu audio */
static struct audio *find_first_free_audio(
struct resource_context *res_ctx,
const struct resource_pool *pool,
@@ -1700,7 +1693,6 @@
}
return 0;
}
-#endif
bool resource_is_stream_unchanged(
struct dc_state *old_context, struct dc_stream_state *stream)
@@ -2023,7 +2015,6 @@
pipe_ctx->stream_res.stream_enc,
true);
-#ifndef __NetBSD__ /* XXX amdgpu audio */
/* TODO: Add check if ASIC support and EDID audio */
if (!stream->converter_disable_audio &&
dc_is_audio_capable_signal(pipe_ctx->stream->signal) &&
@@ -2040,7 +2031,6 @@
update_audio_usage(&context->res_ctx, pool,
pipe_ctx->stream_res.audio, true);
}
-#endif
/* Add ABM to the resource if on EDP */
if (pipe_ctx->stream && dc_is_embedded_signal(pipe_ctx->stream->signal))
@@ -2050,12 +2040,8 @@
if (context->streams[i] == stream) {
context->stream_status[i].primary_otg_inst = pipe_ctx->stream_res.tg->inst;
context->stream_status[i].stream_enc_inst = pipe_ctx->stream_res.stream_enc->id;
-#ifdef __NetBSD__ /* XXX amdgpu audio */
- context->stream_status[i].audio_inst = -1;
-#else
context->stream_status[i].audio_inst =
pipe_ctx->stream_res.audio ? pipe_ctx->stream_res.audio->inst : -1;
-#endif
return DC_OK;
}
diff -r f65a125ba865 -r f8af9d816cff sys/external/bsd/drm2/dist/drm/amd/display/dc/dce/dce_audio.h
--- a/sys/external/bsd/drm2/dist/drm/amd/display/dc/dce/dce_audio.h Sun Dec 19 11:59:19 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/display/dc/dce/dce_audio.h Sun Dec 19 11:59:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dce_audio.h,v 1.3 2021/12/19 10:59:01 riastradh Exp $ */
+/* $NetBSD: dce_audio.h,v 1.4 2021/12/19 11:59:30 riastradh Exp $ */
/*
* Copyright 2012-15 Advanced Micro Devices, Inc.
@@ -123,8 +123,6 @@
};
-#ifndef __NetBSD__ /* XXX amdgpu audio */
-
struct dce_audio {
struct audio base;
const struct dce_audio_registers *regs;
@@ -156,6 +154,4 @@
const struct audio_crtc_info *crtc_info,
const struct audio_pll_info *pll_info);
-#endif
-
#endif /*__DAL_AUDIO_DCE_110_H__*/
diff -r f65a125ba865 -r f8af9d816cff sys/external/bsd/drm2/dist/drm/amd/display/dc/dce100/amdgpu_dce100_resource.c
--- a/sys/external/bsd/drm2/dist/drm/amd/display/dc/dce100/amdgpu_dce100_resource.c Sun Dec 19 11:59:19 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/display/dc/dce100/amdgpu_dce100_resource.c Sun Dec 19 11:59:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdgpu_dce100_resource.c,v 1.4 2021/12/19 10:59:37 riastradh Exp $ */
+/* $NetBSD: amdgpu_dce100_resource.c,v 1.5 2021/12/19 11:59:30 riastradh Exp $ */
/*
* Copyright 2012-15 Advanced Micro Devices, Inc.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_dce100_resource.c,v 1.4 2021/12/19 10:59:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_dce100_resource.c,v 1.5 2021/12/19 11:59:30 riastradh Exp $");
#include <linux/slab.h>
@@ -290,7 +290,6 @@
aux_engine_regs(5)
};
-#ifndef __NetBSD__ /* XXX amdgpu audio */
#define audio_regs(id)\
[id] = {\
AUD_COMMON_REG_LIST(id)\
@@ -313,7 +312,6 @@
static const struct dce_audio_mask audio_mask = {
AUD_COMMON_MASK_SH_LIST(_MASK)
};
-#endif
#define clk_src_regs(id)\
[id] = {\
@@ -451,12 +449,8 @@
static struct audio *create_audio(
struct dc_context *ctx, unsigned int inst)
{
-#ifdef __NetBSD__ /* XXX amdgpu audio */
- return NULL;
-#else
return dce_audio_create(ctx, inst,
&audio_regs[inst], &audio_shift, &audio_mask);
-#endif
}
static struct timing_generator *dce100_timing_generator_create(
@@ -787,12 +781,10 @@
if (pool->base.dp_clock_source != NULL)
dce100_clock_source_destroy(&pool->base.dp_clock_source);
-#ifndef __NetBSD__ /* XXX amdgpu audio */
for (i = 0; i < pool->base.audio_count; i++) {
if (pool->base.audios[i] != NULL)
dce_aud_destroy(&pool->base.audios[i]);
}
-#endif
if (pool->base.abm != NULL)
dce_abm_destroy(&pool->base.abm);
diff -r f65a125ba865 -r f8af9d816cff sys/external/bsd/drm2/dist/drm/amd/display/dc/dce110/amdgpu_dce110_hw_sequencer.c
--- a/sys/external/bsd/drm2/dist/drm/amd/display/dc/dce110/amdgpu_dce110_hw_sequencer.c Sun Dec 19 11:59:19 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/display/dc/dce110/amdgpu_dce110_hw_sequencer.c Sun Dec 19 11:59:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdgpu_dce110_hw_sequencer.c,v 1.4 2021/12/19 10:59:37 riastradh Exp $ */
+/* $NetBSD: amdgpu_dce110_hw_sequencer.c,v 1.5 2021/12/19 11:59:30 riastradh Exp $ */
/*
* Copyright 2015 Advanced Micro Devices, Inc.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_dce110_hw_sequencer.c,v 1.4 2021/12/19 10:59:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_dce110_hw_sequencer.c,v 1.5 2021/12/19 11:59:30 riastradh Exp $");
#include <linux/delay.h>
@@ -689,13 +689,11 @@
tg->funcs->set_early_control(tg, early_control);
-#ifndef __NetBSD__ /* XXX amdgpu audio */
/* enable audio only within mode set */
if (pipe_ctx->stream_res.audio != NULL) {
if (dc_is_dp_signal(pipe_ctx->stream->signal))
pipe_ctx->stream_res.stream_enc->funcs->dp_audio_enable(pipe_ctx->stream_res.stream_enc);
}
-#endif
@@ -950,7 +948,6 @@
void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
{
-#ifndef __NetBSD__ /* XXX amdgpu audio */
/* notify audio driver for audio modes of monitor */
struct dc *dc;
struct clk_mgr *clk_mgr;
@@ -984,12 +981,10 @@
if (pipe_ctx->stream_res.audio)
pipe_ctx->stream_res.audio->enabled = true;
}
-#endif
}
Home |
Main Index |
Thread Index |
Old Index