/*
*
* 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,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
*/
/*
* Copyright (c) 2012 Intel Corporation. All rights reserved.
*/
#include <sys/visual_io.h>
#include <sys/ddi_impldefs.h>
#include "drmP.h"
/**
* drm_sysfs_device_add - adds a class device to sysfs for a character driver
* @dev: DRM device to be added
* @head: DRM head in question
*
* Add a DRM device to the DRM's device model class. We use @dev's PCI device
* as the parent for the Linux device, and make sure it has a file containing
* the driver we're using (for userspace compatibility).
*/
{
int ret;
case DRM_MINOR_AGPMASTER:
if (ret != DDI_SUCCESS) {
DRM_ERROR("agpmaster_attach failed");
return (ret);
}
return (0);
case DRM_MINOR_VGATEXT:
/* Generic graphics initialization */
if (ret != DDI_SUCCESS) {
DRM_ERROR("gfxp_vgatext_attach failed");
return (EFAULT);
}
if (ret != DDI_SUCCESS) {
DRM_ERROR("ddi_create_minor_node failed");
return (EFAULT);
}
return (0);
case DRM_MINOR_LEGACY:
case DRM_MINOR_CONTROL:
case DRM_MINOR_RENDER:
if (ret != DDI_SUCCESS) {
DRM_ERROR("ddi_create_minor_node failed");
return (EFAULT);
}
return (0);
}
return (ENOTSUP);
}
/**
* drm_sysfs_device_remove - remove DRM device
* @dev: DRM device to remove
*
* This call unregisters and cleans up a class device that was created with a
* call to drm_sysfs_device_add()
*/
{
case DRM_MINOR_AGPMASTER:
}
break;
case DRM_MINOR_VGATEXT:
}
/* LINTED */
case DRM_MINOR_LEGACY:
case DRM_MINOR_CONTROL:
case DRM_MINOR_RENDER:
}
}