From 9458029940ffc64bca0c5a30ea626c377205842e Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 6 Jul 2012 12:14:00 +1000 Subject: drm/nouveau: implement module init functions in nouveau_drm.c These currently just call the existing ones in nouveau_drv.c, but will be extended in upcoming commits. This needed to be separated from the current code as there will be some header clashes until things are ported. Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nouveau_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/drm/nouveau/nouveau_acpi.c') diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index 26ebffebe710..778cd149f7cd 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -12,7 +12,7 @@ #include "drm_sarea.h" #include "drm_crtc_helper.h" #include "nouveau_drv.h" -#include "nouveau_drm.h" +#include #include "nv50_display.h" #include "nouveau_connector.h" -- cgit v1.2.1 From ebb945a94bba2ce8dff7b0942ff2b3f2a52a0a69 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 20 Jul 2012 08:17:34 +1000 Subject: drm/nouveau: port all engines to new engine module format This is a HUGE commit, but it's not nearly as bad as it looks - any problems can be isolated to a particular chipset and engine combination. It was simply too difficult to port each one at a time, the compat layers are *already* ridiculous. Most of the changes here are simply to the glue, the process for each of the engine modules was to start with a standard skeleton and copy+paste the old code into the appropriate places, fixing up variable names etc as needed. v2: Marcin Slusarz - fix find/replace bug in license header v3: Ben Skeggs - bump indirect pushbuf size to 8KiB, 4KiB barely enough for userspace and left no space for kernel's requirements during GEM pushbuf submission. - fix duplicate assignments noticed by clang v4: Marcin Slusarz - add sparse annotations to nv04_fifo_pause/nv04_fifo_start - use ioread32_native/iowrite32_native for fifo control registers v5: Ben Skeggs - rebase on v3.6-rc4, modified to keep copy engine fix intact - nv10/fence: unmap fence bo before destroying - fixed fermi regression when using nvidia gr fuc - fixed typo in supported dma_mask checking Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nouveau_acpi.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/gpu/drm/nouveau/nouveau_acpi.c') diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index 778cd149f7cd..83686ef75d04 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -13,7 +13,6 @@ #include "drm_crtc_helper.h" #include "nouveau_drv.h" #include -#include "nv50_display.h" #include "nouveau_connector.h" #include -- cgit v1.2.1 From c0077061e7ea3a8c1c316c87a79976bf8f00beb5 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Thu, 26 Jul 2012 08:51:21 +1000 Subject: drm/nouveau/acpi: move definitions out of nouveau_drv.h Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nouveau_acpi.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'drivers/gpu/drm/nouveau/nouveau_acpi.c') 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 #include -#include "drmP.h" -#include "drm.h" -#include "drm_sarea.h" -#include "drm_crtc_helper.h" -#include "nouveau_drv.h" -#include -#include "nouveau_connector.h" - #include +#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); } -- cgit v1.2.1