summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-10 10:45:55 -0700
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-10 10:45:55 -0700
commit44a8761302888080f1cb6596d4573d88c1746da4 (patch)
tree851220ca0bdcd7677eda5ea796a4eb5a670bf406 /shared-core
parente114b981bc291049fa6996d487334a408acc1ce2 (diff)
parent50672adb3142abca743535a8e60c360ef47b2a08 (diff)
Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
Conflicts: linux-core/drm_crtc.c - trivial merge linux-core/drm_crtc.h - trivial merge linux-core/intel_display.c - crtc_config -> mode_config shared-core/i915_dma.c - accommodate new init code in i915_init.c
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/drm.h13
-rw-r--r--shared-core/i915_dma.c4
-rw-r--r--shared-core/i915_drv.h1
-rw-r--r--shared-core/i915_init.c4
4 files changed, 17 insertions, 5 deletions
diff --git a/shared-core/drm.h b/shared-core/drm.h
index 49bc41bc..f1afc049 100644
--- a/shared-core/drm.h
+++ b/shared-core/drm.h
@@ -891,7 +891,7 @@ typedef union drm_mm_init_arg{
/*
* Drm mode setting
*/
-
+#define DRM_OUTPUT_NAME_LEN 32
#define DRM_DISPLAY_MODE_LEN 32
struct drm_mode_modeinfo {
@@ -946,6 +946,7 @@ struct drm_mode_get_output {
unsigned int output; /**< Id */
unsigned int crtc; /**< Id of crtc */
+ unsigned char name[DRM_OUTPUT_NAME_LEN];
unsigned int connection;
unsigned int mm_width, mm_height; /**< HxW in millimeters */
@@ -962,6 +963,14 @@ struct drm_mode_get_output {
};
+struct drm_mode_fb_cmd {
+ unsigned int buffer_id;
+ unsigned int width, height;
+ unsigned int pitch;
+ unsigned int bpp;
+ unsigned int handle;
+};
+
/**
* \name Ioctls Definitions
*/
@@ -1037,6 +1046,8 @@ struct drm_mode_get_output {
#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc)
#define DRM_IOCTL_MODE_GETOUTPUT DRM_IOWR(0xA2, struct drm_mode_get_output)
#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA3, struct drm_mode_crtc)
+#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xA4, struct drm_mode_fb_cmd)
+#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xA5, unsigned int)
/*@}*/
/**
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index 0ba3048a..1c8a0d45 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -171,9 +171,7 @@ static int i915_initialize(drm_device_t * dev,
I915_WRITE(0x02080, dev_priv->dma_status_page);
DRM_DEBUG("Enabled hardware status page\n");
- /* this probably doesn't belong here - TODO */
- drm_framebuffer_set_object(dev, dev_priv->sarea_priv->front_handle);
- drm_set_desired_modes(dev);
+//drm_set_desired_modes(dev);
return 0;
}
diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h
index 6e81f6f8..b1bf0469 100644
--- a/shared-core/i915_drv.h
+++ b/shared-core/i915_drv.h
@@ -92,6 +92,7 @@ typedef struct drm_i915_private {
drm_local_map_t *sarea;
drm_local_map_t *mmio_map;
+ unsigned long baseaddr;
unsigned long mmiobase;
unsigned long mmiolen;
diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c
index e03ed429..e454c9fc 100644
--- a/shared-core/i915_init.c
+++ b/shared-core/i915_init.c
@@ -28,9 +28,11 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags)
if (IS_I9XX(dev)) {
dev_priv->mmiobase = drm_get_resource_start(dev, 0);
dev_priv->mmiolen = drm_get_resource_len(dev, 0);
+ dev_priv->baseaddr = drm_get_resource_start(dev, 2) & 0xff000000;
} else if (drm_get_resource_start(dev, 1)) {
dev_priv->mmiobase = drm_get_resource_start(dev, 1);
dev_priv->mmiolen = drm_get_resource_len(dev, 1);
+ dev_priv->baseaddr = drm_get_resource_start(dev, 0) & 0xff000000;
} else {
DRM_ERROR("Unable to find MMIO registers\n");
return -ENODEV;
@@ -66,7 +68,7 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags)
drm_bo_driver_init(dev);
/* this probably doesn't belong here - TODO */
- drm_framebuffer_set_object(dev, dev_priv->sarea_priv->front_handle);
+ //drm_framebuffer_set_object(dev, dev_priv->sarea_priv->front_handle);
intel_modeset_init(dev);
drm_set_desired_modes(dev);