summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_acpi.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-07-26 08:51:21 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-10-03 13:12:57 +1000
commitc0077061e7ea3a8c1c316c87a79976bf8f00beb5 (patch)
tree8e9219dafef3c0c04ceb15be8fe04ffba0b1649d /drivers/gpu/drm/nouveau/nouveau_acpi.c
parentd38ac5217ab43cf61e8ebe6d7114fb2d1ca9a3a4 (diff)
downloadblackbird-op-linux-c0077061e7ea3a8c1c316c87a79976bf8f00beb5.tar.gz
blackbird-op-linux-c0077061e7ea3a8c1c316c87a79976bf8f00beb5.zip
drm/nouveau/acpi: move definitions out of nouveau_drv.h
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_acpi.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_acpi.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
index 83686ef75d04..e7369c8239d3 100644
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -7,16 +7,13 @@
#include <acpi/acpi.h>
#include <linux/mxm-wmi.h>
-#include "drmP.h"
-#include "drm.h"
-#include "drm_sarea.h"
-#include "drm_crtc_helper.h"
-#include "nouveau_drv.h"
-#include <nouveau_drm.h>
-#include "nouveau_connector.h"
-
#include <linux/vga_switcheroo.h>
+#include "drm_edid.h"
+
+#include "nouveau_drm.h"
+#include "nouveau_acpi.h"
+
#define NOUVEAU_DSM_LED 0x02
#define NOUVEAU_DSM_LED_STATE 0x00
#define NOUVEAU_DSM_LED_OFF 0x10
@@ -389,10 +386,9 @@ int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len)
return nouveau_rom_call(nouveau_dsm_priv.rom_handle, bios, offset, len);
}
-int
+void *
nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector)
{
- struct nouveau_connector *nv_connector = nouveau_connector(connector);
struct acpi_device *acpidev;
acpi_handle handle;
int type, ret;
@@ -404,21 +400,20 @@ nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector)
type = ACPI_VIDEO_DISPLAY_LCD;
break;
default:
- return -EINVAL;
+ return NULL;
}
handle = DEVICE_ACPI_HANDLE(&dev->pdev->dev);
if (!handle)
- return -ENODEV;
+ return NULL;
ret = acpi_bus_get_device(handle, &acpidev);
if (ret)
- return -ENODEV;
+ return NULL;
ret = acpi_video_get_edid(acpidev, type, -1, &edid);
if (ret < 0)
- return ret;
+ return NULL;
- nv_connector->edid = kmemdup(edid, EDID_LENGTH, GFP_KERNEL);
- return 0;
+ return kmemdup(edid, EDID_LENGTH, GFP_KERNEL);
}
OpenPOWER on IntegriCloud