From 2be292f6ea8df96afc1454f30918b1b391fba2ba Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 26 Jul 2008 08:43:01 +1000 Subject: nv50: remove TRUE/FALSE --- linux-core/nv50_crtc.c | 2 +- linux-core/nv50_display.c | 2 +- linux-core/nv50_kms_wrapper.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/linux-core/nv50_crtc.c b/linux-core/nv50_crtc.c index c4ca7e76..f56aa339 100644 --- a/linux-core/nv50_crtc.c +++ b/linux-core/nv50_crtc.c @@ -127,7 +127,7 @@ static int nv50_crtc_execute_mode(struct nv50_crtc *crtc) OUT_MODE(NV50_CRTC0_SCALE_CENTER_OFFSET + offset, NV50_CRTC_SCALE_CENTER_OFFSET_VAL(0,0)); /* Maybe move this as well? */ - crtc->blank(crtc, FALSE); + crtc->blank(crtc, false); return 0; } diff --git a/linux-core/nv50_display.c b/linux-core/nv50_display.c index b68c4e28..eeaa0e68 100644 --- a/linux-core/nv50_display.c +++ b/linux-core/nv50_display.c @@ -171,7 +171,7 @@ static int nv50_display_disable(struct nv50_display *display) /* disable clock change interrupts. */ NV_WRITE(NV50_PDISPLAY_SUPERVISOR_INTR, NV_READ(NV50_PDISPLAY_SUPERVISOR_INTR) & ~0x70); - display->init_done = FALSE; + display->init_done = false; return 0; } diff --git a/linux-core/nv50_kms_wrapper.c b/linux-core/nv50_kms_wrapper.c index 355d25d6..1c4b52d7 100644 --- a/linux-core/nv50_kms_wrapper.c +++ b/linux-core/nv50_kms_wrapper.c @@ -950,11 +950,11 @@ static enum drm_connector_status nv50_kms_connector_detect(struct drm_connector i2c_detect = connector->i2c_detect(connector); if (load_detect == 1) { - nv50_kms_connector_set_digital(drm_connector, 0, TRUE); /* analog, forced */ + nv50_kms_connector_set_digital(drm_connector, 0, true); /* analog, forced */ } else if (hpd_detect == 1 && load_detect == 0) { - nv50_kms_connector_set_digital(drm_connector, 1, TRUE); /* digital, forced */ + nv50_kms_connector_set_digital(drm_connector, 1, true); /* digital, forced */ } else { - nv50_kms_connector_set_digital(drm_connector, -1, TRUE); /* unknown, forced */ + nv50_kms_connector_set_digital(drm_connector, -1, true); /* unknown, forced */ } if (hpd_detect == 1 || load_detect == 1 || i2c_detect == 1) -- cgit v1.2.3 From 66723c09f5e4d60f1c746d112b065bacc1cfa89f Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 26 Jul 2008 08:43:59 +1000 Subject: modesetting: pass file priv to cursor --- linux-core/drm_crtc.c | 2 +- linux-core/drm_crtc.h | 4 ++-- linux-core/intel_display.c | 1 + linux-core/nv50_kms_wrapper.c | 6 ++++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c index 91bff1f6..7ee33219 100644 --- a/linux-core/drm_crtc.c +++ b/linux-core/drm_crtc.c @@ -1445,7 +1445,7 @@ int drm_mode_cursor_ioctl(struct drm_device *dev, if (req->flags & DRM_MODE_CURSOR_BO) { /* Turn of the cursor if handle is 0 */ if (crtc->funcs->cursor_set) { - ret = crtc->funcs->cursor_set(crtc, req->handle, req->width, req->height); + ret = crtc->funcs->cursor_set(crtc, file_priv, req->handle, req->width, req->height); } else { DRM_ERROR("crtc does not support cursor\n"); ret = -EFAULT; diff --git a/linux-core/drm_crtc.h b/linux-core/drm_crtc.h index 117b7213..bfccdeb5 100644 --- a/linux-core/drm_crtc.h +++ b/linux-core/drm_crtc.h @@ -299,8 +299,8 @@ struct drm_crtc_funcs { void (*restore)(struct drm_crtc *crtc); /* resume? */ /* cursor controls */ - int (*cursor_set)(struct drm_crtc *crtc, uint32_t buffer_handle, - uint32_t width, uint32_t height); + int (*cursor_set)(struct drm_crtc *crtc, struct drm_file *file_priv, + uint32_t handle, uint32_t width, uint32_t height); int (*cursor_move)(struct drm_crtc *crtc, int x, int y); /* Set gamma on the CRTC */ diff --git a/linux-core/intel_display.c b/linux-core/intel_display.c index 29aae169..b8077bd2 100644 --- a/linux-core/intel_display.c +++ b/linux-core/intel_display.c @@ -972,6 +972,7 @@ void intel_crtc_load_lut(struct drm_crtc *crtc) } static int intel_crtc_cursor_set(struct drm_crtc *crtc, + struct drm_file *file_priv, uint32_t handle, uint32_t width, uint32_t height) { diff --git a/linux-core/nv50_kms_wrapper.c b/linux-core/nv50_kms_wrapper.c index 1c4b52d7..77271c1b 100644 --- a/linux-core/nv50_kms_wrapper.c +++ b/linux-core/nv50_kms_wrapper.c @@ -236,8 +236,10 @@ static const struct drm_mode_config_funcs nv50_kms_mode_funcs = { * CRTC functions. */ -static int nv50_kms_crtc_cursor_set(struct drm_crtc *drm_crtc, uint32_t buffer_handle, - uint32_t width, uint32_t height) +static int nv50_kms_crtc_cursor_set(struct drm_crtc *drm_crtc, + struct drm_file *file_priv, + uint32_t buffer_handle, + uint32_t width, uint32_t height) { struct nv50_crtc *crtc = to_nv50_crtc(drm_crtc); struct nv50_display *display = nv50_get_display(crtc->dev); -- cgit v1.2.3 From 7fd7ba87f35aa4881e99b95bab4151b3f9db9b8e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 25 Jul 2008 13:30:08 +1000 Subject: drm: don't set the signal blocker on the master process. this lets us debug the X server through xkb startup. Not sure what the correct answer is, probably X needs to drop the lock when execing stuff, with input hotplug it can get xkb stuff at any time I believe. --- linux-core/drm_lock.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/linux-core/drm_lock.c b/linux-core/drm_lock.c index 6bbf1444..6e90e97f 100644 --- a/linux-core/drm_lock.c +++ b/linux-core/drm_lock.c @@ -107,14 +107,19 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) ret ? "interrupted" : "has lock"); if (ret) return ret; - sigemptyset(&dev->sigmask); - sigaddset(&dev->sigmask, SIGSTOP); - sigaddset(&dev->sigmask, SIGTSTP); - sigaddset(&dev->sigmask, SIGTTIN); - sigaddset(&dev->sigmask, SIGTTOU); - dev->sigdata.context = lock->context; - dev->sigdata.lock = master->lock.hw_lock; - block_all_signals(drm_notifier, &dev->sigdata, &dev->sigmask); + /* don't set the block all signals on the master process for now + * really probably not the correct answer but lets us debug xkb + * xserver for now */ + if (!file_priv->is_master) { + sigemptyset(&dev->sigmask); + sigaddset(&dev->sigmask, SIGSTOP); + sigaddset(&dev->sigmask, SIGTSTP); + sigaddset(&dev->sigmask, SIGTTIN); + sigaddset(&dev->sigmask, SIGTTOU); + dev->sigdata.context = lock->context; + dev->sigdata.lock = master->lock.hw_lock; + block_all_signals(drm_notifier, &dev->sigdata, &dev->sigmask); + } if (dev->driver->dma_ready && (lock->flags & _DRM_LOCK_READY)) dev->driver->dma_ready(dev); -- cgit v1.2.3