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 drm/gem: Comment obscure cons...



details:   https://anonhg.NetBSD.org/src/rev/3a545b979dc2
branches:  trunk
changeset: 1028607:3a545b979dc2
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:26:14 2021 +0000

description:
drm/gem: Comment obscure constant parameters.

diffstat:

 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/drm_gem.c                                    |   9 +++--
 4 files changed, 37 insertions(+), 10 deletions(-)

diffs (233 lines):

diff -r e7e9447af32e -r 3a545b979dc2 sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn10/amdgpu_dcn10_resource.c
--- a/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn10/amdgpu_dcn10_resource.c       Sun Dec 19 11:26:04 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn10/amdgpu_dcn10_resource.c       Sun Dec 19 11:26:14 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdgpu_dcn10_resource.c,v 1.2 2021/12/18 23:45:03 riastradh Exp $      */
+/*     $NetBSD: amdgpu_dcn10_resource.c,v 1.3 2021/12/19 11:26:14 riastradh Exp $      */
 
 /*
 * Copyright 2016 Advanced Micro Devices, Inc.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_dcn10_resource.c,v 1.2 2021/12/18 23:45:03 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_dcn10_resource.c,v 1.3 2021/12/19 11:26:14 riastradh Exp $");
 
 #include <linux/slab.h>
 
@@ -256,6 +256,8 @@
                SE_COMMON_MASK_SH_LIST_DCN10(_MASK)
 };
 
+#ifndef __NetBSD__             /* XXX amdgpu audio */
+
 #define audio_regs(id)\
 [id] = {\
                AUD_COMMON_REG_LIST(id)\
@@ -281,6 +283,8 @@
                DCE120_AUD_COMMON_MASK_SH_LIST(_MASK)
 };
 
+#endif
+
 #define aux_regs(id)\
 [id] = {\
        AUX_REG_LIST(id)\
@@ -843,12 +847,14 @@
                FN(DC_PINSTRAPS, DC_PINSTRAPS_AUDIO), &straps->dc_pinstraps_audio);
 }
 
+#ifndef __NetBSD__             /* XXX amdgpu audio */
 static struct audio *create_audio(
                struct dc_context *ctx, unsigned int inst)
 {
        return dce_audio_create(ctx, inst,
                        &audio_regs[inst], &audio_shift, &audio_mask);
 }
+#endif
 
 static struct stream_encoder *dcn10_stream_encoder_create(
        enum engine_id eng_id,
@@ -897,14 +903,18 @@
 
 static const struct resource_create_funcs res_create_funcs = {
        .read_dce_straps = read_dce_straps,
+#ifndef __NetBSD__             /* XXX amdgpu audio */
        .create_audio = create_audio,
+#endif
        .create_stream_encoder = dcn10_stream_encoder_create,
        .create_hwseq = dcn10_hwseq_create,
 };
 
 static const struct resource_create_funcs res_create_maximus_funcs = {
        .read_dce_straps = NULL,
+#ifndef __NetBSD__             /* XXX amdgpu audio */
        .create_audio = NULL,
+#endif
        .create_stream_encoder = NULL,
        .create_hwseq = dcn10_hwseq_create,
 };
@@ -986,8 +996,10 @@
        }
 
        for (i = 0; i < pool->base.audio_count; i++) {
+#ifndef __NetBSD__             /* XXX amdgpu audio */
                if (pool->base.audios[i])
                        dce_aud_destroy(&pool->base.audios[i]);
+#endif
        }
 
        for (i = 0; i < pool->base.clk_src_count; i++) {
diff -r e7e9447af32e -r 3a545b979dc2 sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_hwseq.c
--- a/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_hwseq.c  Sun Dec 19 11:26:04 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_hwseq.c  Sun Dec 19 11:26:14 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdgpu_dcn20_hwseq.c,v 1.2 2021/12/18 23:45:03 riastradh Exp $ */
+/*     $NetBSD: amdgpu_dcn20_hwseq.c,v 1.3 2021/12/19 11:26:14 riastradh Exp $ */
 
 /*
  * Copyright 2016 Advanced Micro Devices, Inc.
@@ -25,7 +25,7 @@
  *
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_dcn20_hwseq.c,v 1.2 2021/12/18 23:45:03 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_dcn20_hwseq.c,v 1.3 2021/12/19 11:26:14 riastradh Exp $");
 
 #include <linux/delay.h>
 
@@ -2035,6 +2035,7 @@
 
                /* free acquired resources */
                if (pipe_ctx->stream_res.audio) {
+#ifndef __NetBSD__             /* XXX amdgpu audio */
                        /*disable az_endpoint*/
                        pipe_ctx->stream_res.audio->funcs->az_disable(pipe_ctx->stream_res.audio);
 
@@ -2046,6 +2047,7 @@
                                                pipe_ctx->stream_res.audio, false);
                                pipe_ctx->stream_res.audio = NULL;
                        }
+#endif
                }
        }
        else if (pipe_ctx->stream_res.dsc) {
diff -r e7e9447af32e -r 3a545b979dc2 sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c
--- a/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c       Sun Dec 19 11:26:04 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c       Sun Dec 19 11:26:14 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdgpu_dcn20_resource.c,v 1.2 2021/12/18 23:45:03 riastradh Exp $      */
+/*     $NetBSD: amdgpu_dcn20_resource.c,v 1.3 2021/12/19 11:26:14 riastradh Exp $      */
 
 /*
 * Copyright 2016 Advanced Micro Devices, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_dcn20_resource.c,v 1.2 2021/12/18 23:45:03 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_dcn20_resource.c,v 1.3 2021/12/19 11:26:14 riastradh Exp $");
 
 #include <linux/slab.h>
 
@@ -473,6 +473,8 @@
                ABM_MASK_SH_LIST_DCN20(_MASK)
 };
 
+#ifndef __NetBSD__             /* XXX amdgpu */
+
 #define audio_regs(id)\
 [id] = {\
                AUD_COMMON_REG_LIST(id)\
@@ -501,6 +503,8 @@
                DCE120_AUD_COMMON_MASK_SH_LIST(_MASK)
 };
 
+#endif /* __NetBSD__ */
+
 #define stream_enc_regs(id)\
 [id] = {\
        SE_DCN2_REG_LIST(id)\
@@ -1211,12 +1215,14 @@
                FN(DC_PINSTRAPS, DC_PINSTRAPS_AUDIO), &straps->dc_pinstraps_audio);
 }
 
+#ifndef __NetBSD__             /* XXX amdgpu audio */
 static struct audio *dcn20_create_audio(
                struct dc_context *ctx, unsigned int inst)
 {
        return dce_audio_create(ctx, inst,
                        &audio_regs[inst], &audio_shift, &audio_mask);
 }
+#endif
 
 struct stream_encoder *dcn20_stream_encoder_create(
        enum engine_id eng_id,
@@ -1268,14 +1274,18 @@
 
 static const struct resource_create_funcs res_create_funcs = {
        .read_dce_straps = read_dce_straps,
+#ifndef __NetBSD__             /* XXX amdgpu audio */
        .create_audio = dcn20_create_audio,
+#endif
        .create_stream_encoder = dcn20_stream_encoder_create,
        .create_hwseq = dcn20_hwseq_create,
 };
 
 static const struct resource_create_funcs res_create_maximus_funcs = {
        .read_dce_straps = NULL,
+#ifndef __NetBSD__             /* XXX amdgpu audio */
        .create_audio = NULL,
+#endif
        .create_stream_encoder = NULL,
        .create_hwseq = dcn20_hwseq_create,
 };
@@ -1389,8 +1399,10 @@
        }
 
        for (i = 0; i < pool->base.audio_count; i++) {
+#ifndef __NetBSD__             /* XXX amdgpu audio */
                if (pool->base.audios[i])
                        dce_aud_destroy(&pool->base.audios[i]);
+#endif
        }
 
        for (i = 0; i < pool->base.clk_src_count; i++) {
diff -r e7e9447af32e -r 3a545b979dc2 sys/external/bsd/drm2/dist/drm/drm_gem.c
--- a/sys/external/bsd/drm2/dist/drm/drm_gem.c  Sun Dec 19 11:26:04 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_gem.c  Sun Dec 19 11:26:14 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_gem.c,v 1.20 2021/12/19 11:07:28 riastradh Exp $   */
+/*     $NetBSD: drm_gem.c,v 1.21 2021/12/19 11:26:14 riastradh Exp $   */
 
 /*
  * Copyright © 2008 Intel Corporation
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_gem.c,v 1.20 2021/12/19 11:07:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_gem.c,v 1.21 2021/12/19 11:26:14 riastradh Exp $");
 
 #include <linux/types.h>
 #include <linux/slab.h>
@@ -188,7 +188,8 @@
        obj->filp = NULL;
        KASSERT(drm_core_check_feature(dev, DRIVER_GEM));
        KASSERT(dev->driver->gem_uvm_ops != NULL);
-       uvm_obj_init(&obj->gemo_uvmobj, dev->driver->gem_uvm_ops, true, 1);
+       uvm_obj_init(&obj->gemo_uvmobj, dev->driver->gem_uvm_ops,
+           /*allocate lock*/true, /*nrefs*/1);
 #else
        obj->filp = NULL;
 #endif
@@ -1065,7 +1066,7 @@
        drm_vma_node_destroy(&obj->vma_node);
        if (obj->filp)
                uao_detach(obj->filp);
-       uvm_obj_destroy(&obj->gemo_uvmobj, true);
+       uvm_obj_destroy(&obj->gemo_uvmobj, /*free lock*/true);
 #else
        if (obj->filp)
                fput(obj->filp);



Home | Main Index | Thread Index | Old Index