VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVdma.cpp@ 108641

Last change on this file since 108641 was 108641, checked in by vboxsync, 2 months ago

Removed 2D video acceleration (aka VHWA / VBOX_WITH_VIDEOHWACCEL). bugref:10756

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/* $Id: VBoxMPVdma.cpp 108641 2025-03-20 12:48:42Z vboxsync $ */
2/** @file
3 * VBox WDDM Miniport driver
4 */
5
6/*
7 * Copyright (C) 2011-2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#include "VBoxMPWddm.h"
29#include "common/VBoxMPCommon.h"
30#include "VBoxMPVdma.h"
31#include <iprt/asm.h>
32#include <iprt/mem.h>
33
34
35static DECLCALLBACK(void *) hgsmiEnvAlloc(void *pvEnv, HGSMISIZE cb)
36{
37 NOREF(pvEnv);
38 return RTMemAlloc(cb);
39}
40
41static DECLCALLBACK(void) hgsmiEnvFree(void *pvEnv, void *pv)
42{
43 NOREF(pvEnv);
44 RTMemFree(pv);
45}
46
47static HGSMIENV g_hgsmiEnvVdma =
48{
49 NULL,
50 hgsmiEnvAlloc,
51 hgsmiEnvFree
52};
53
54/* create a DMACommand buffer */
55int vboxVdmaCreate(PVBOXMP_DEVEXT pDevExt, VBOXVDMAINFO *pInfo
56 )
57{
58 RT_NOREF(pDevExt);
59 pInfo->fEnabled = FALSE;
60
61 return VINF_SUCCESS;
62}
63
64int vboxVdmaDisable (PVBOXMP_DEVEXT pDevExt, PVBOXVDMAINFO pInfo)
65{
66 RT_NOREF(pDevExt);
67
68 if (!pInfo->fEnabled)
69 return VINF_ALREADY_INITIALIZED;
70
71 /* ensure nothing else is submitted */
72 pInfo->fEnabled = FALSE;
73 return VINF_SUCCESS;
74}
75
76int vboxVdmaEnable (PVBOXMP_DEVEXT pDevExt, PVBOXVDMAINFO pInfo)
77{
78 RT_NOREF(pDevExt);
79 Assert(!pInfo->fEnabled);
80 if (pInfo->fEnabled)
81 return VINF_ALREADY_INITIALIZED;
82 return VINF_SUCCESS;
83}
84
85int vboxVdmaDestroy (PVBOXMP_DEVEXT pDevExt, PVBOXVDMAINFO pInfo)
86{
87 int rc = VINF_SUCCESS;
88 Assert(!pInfo->fEnabled);
89 if (pInfo->fEnabled)
90 rc = vboxVdmaDisable (pDevExt, pInfo);
91 return rc;
92}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette