mdpy.c (ffb1e76f4f32d2b8ea4189df0484980370476395) mdpy.c (c68ea0d00ad82428154aed890ec9f793e460fa1c)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Mediated virtual PCI display host device driver
4 *
5 * See mdpy-defs.h for device specs
6 *
7 * (c) Gerd Hoffmann <kraxel@redhat.com>
8 *

--- 244 unchanged lines hidden (view full) ---

253 mdev_state->mdev = mdev;
254 mdev_state->type = type;
255 mdev_state->memsize = fbsize;
256 mdpy_create_config_space(mdev_state);
257 mdpy_reset(mdev_state);
258
259 mdpy_count++;
260
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Mediated virtual PCI display host device driver
4 *
5 * See mdpy-defs.h for device specs
6 *
7 * (c) Gerd Hoffmann <kraxel@redhat.com>
8 *

--- 244 unchanged lines hidden (view full) ---

253 mdev_state->mdev = mdev;
254 mdev_state->type = type;
255 mdev_state->memsize = fbsize;
256 mdpy_create_config_space(mdev_state);
257 mdpy_reset(mdev_state);
258
259 mdpy_count++;
260
261 ret = vfio_register_group_dev(&mdev_state->vdev);
261 ret = vfio_register_emulated_iommu_dev(&mdev_state->vdev);
262 if (ret)
263 goto err_mem;
264 dev_set_drvdata(&mdev->dev, mdev_state);
265 return 0;
266err_mem:
267 vfree(mdev_state->memblk);
268err_vconfig:
269 kfree(mdev_state->vconfig);

--- 537 unchanged lines hidden ---
262 if (ret)
263 goto err_mem;
264 dev_set_drvdata(&mdev->dev, mdev_state);
265 return 0;
266err_mem:
267 vfree(mdev_state->memblk);
268err_vconfig:
269 kfree(mdev_state->vconfig);

--- 537 unchanged lines hidden ---