Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196543
b: refs/heads/master
c: 0a31a44
h: refs/heads/master
i:
  196541: 4e8bb0c
  196539: 1b12c4c
  196535: 1f36981
  196527: c083176
  196511: 7555a70
  196479: a81a123
v: v3
  • Loading branch information
Adam Jackson authored and Eric Anholt committed May 7, 2010
1 parent 3977f85 commit 68b4189
Show file tree
Hide file tree
Showing 83 changed files with 1,235 additions and 2,990 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 26481fb15644b5fd85d4cea020f74a234cdf6803
refs/heads/master: 0a31a448659d48cbc38f5e7520d8a65f8f1f8276
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ menuconfig DRM
depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && MMU
select I2C
select I2C_ALGOBIT
select SLOW_WORK
help
Kernel-level support for the Direct Rendering Infrastructure (DRI)
introduced in XFree86 4.0. If you say Y here, you need to select
Expand All @@ -24,6 +23,7 @@ config DRM_KMS_HELPER
depends on DRM
select FB
select FRAMEBUFFER_CONSOLE if !EMBEDDED
select SLOW_WORK
help
FB and CRTC helpers for KMS drivers.

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/gpu/drm/drm_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ static int drm_add_magic(struct drm_master *master, struct drm_file *priv,
struct drm_device *dev = master->minor->dev;
DRM_DEBUG("%d\n", magic);

entry = kzalloc(sizeof(*entry), GFP_KERNEL);
entry = kmalloc(sizeof(*entry), GFP_KERNEL);
if (!entry)
return -ENOMEM;
memset(entry, 0, sizeof(*entry));
entry->priv = priv;
entry->hash_item.key = (unsigned long)magic;
mutex_lock(&dev->struct_mutex);
Expand Down
95 changes: 0 additions & 95 deletions trunk/drivers/gpu/drm/drm_crtc_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,98 +807,3 @@ int drm_helper_resume_force_mode(struct drm_device *dev)
return 0;
}
EXPORT_SYMBOL(drm_helper_resume_force_mode);

static struct slow_work_ops output_poll_ops;

#define DRM_OUTPUT_POLL_PERIOD (10*HZ)
static void output_poll_execute(struct slow_work *work)
{
struct delayed_slow_work *delayed_work = container_of(work, struct delayed_slow_work, work);
struct drm_device *dev = container_of(delayed_work, struct drm_device, mode_config.output_poll_slow_work);
struct drm_connector *connector;
enum drm_connector_status old_status, status;
bool repoll = false, changed = false;
int ret;

mutex_lock(&dev->mode_config.mutex);
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {

/* if this is HPD or polled don't check it -
TV out for instance */
if (!connector->polled)
continue;

else if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT))
repoll = true;

old_status = connector->status;
/* if we are connected and don't want to poll for disconnect
skip it */
if (old_status == connector_status_connected &&
!(connector->polled & DRM_CONNECTOR_POLL_DISCONNECT) &&
!(connector->polled & DRM_CONNECTOR_POLL_HPD))
continue;

status = connector->funcs->detect(connector);
if (old_status != status)
changed = true;
}

mutex_unlock(&dev->mode_config.mutex);

if (changed) {
/* send a uevent + call fbdev */
drm_sysfs_hotplug_event(dev);
if (dev->mode_config.funcs->output_poll_changed)
dev->mode_config.funcs->output_poll_changed(dev);
}

if (repoll) {
ret = delayed_slow_work_enqueue(delayed_work, DRM_OUTPUT_POLL_PERIOD);
if (ret)
DRM_ERROR("delayed enqueue failed %d\n", ret);
}
}

void drm_kms_helper_poll_init(struct drm_device *dev)
{
struct drm_connector *connector;
bool poll = false;
int ret;

list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
if (connector->polled)
poll = true;
}
slow_work_register_user(THIS_MODULE);
delayed_slow_work_init(&dev->mode_config.output_poll_slow_work,
&output_poll_ops);

if (poll) {
ret = delayed_slow_work_enqueue(&dev->mode_config.output_poll_slow_work, DRM_OUTPUT_POLL_PERIOD);
if (ret)
DRM_ERROR("delayed enqueue failed %d\n", ret);
}
}
EXPORT_SYMBOL(drm_kms_helper_poll_init);

void drm_kms_helper_poll_fini(struct drm_device *dev)
{
delayed_slow_work_cancel(&dev->mode_config.output_poll_slow_work);
slow_work_unregister_user(THIS_MODULE);
}
EXPORT_SYMBOL(drm_kms_helper_poll_fini);

void drm_helper_hpd_irq_event(struct drm_device *dev)
{
if (!dev->mode_config.poll_enabled)
return;
delayed_slow_work_cancel(&dev->mode_config.output_poll_slow_work);
/* schedule a slow work asap */
delayed_slow_work_enqueue(&dev->mode_config.output_poll_slow_work, 0);
}
EXPORT_SYMBOL(drm_helper_hpd_irq_event);

static struct slow_work_ops output_poll_ops = {
.execute = output_poll_execute,
};
4 changes: 3 additions & 1 deletion trunk/drivers/gpu/drm/drm_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ int drm_dma_setup(struct drm_device *dev)
{
int i;

dev->dma = kzalloc(sizeof(*dev->dma), GFP_KERNEL);
dev->dma = kmalloc(sizeof(*dev->dma), GFP_KERNEL);
if (!dev->dma)
return -ENOMEM;

memset(dev->dma, 0, sizeof(*dev->dma));

for (i = 0; i <= DRM_MAX_ORDER; i++)
memset(&dev->dma->bufs[i], 0, sizeof(dev->dma->bufs[0]));

Expand Down
23 changes: 12 additions & 11 deletions trunk/drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ static struct drm_display_mode drm_dmt_modes[] = {
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
/* 1024x768@85Hz */
{ DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 94500, 1024, 1072,
1168, 1376, 0, 768, 769, 772, 808, 0,
1072, 1376, 0, 768, 769, 772, 808, 0,
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
/* 1152x864@75Hz */
{ DRM_MODE("1152x864", DRM_MODE_TYPE_DRIVER, 108000, 1152, 1216,
Expand Down Expand Up @@ -658,8 +658,8 @@ static struct drm_display_mode drm_dmt_modes[] = {
static const int drm_num_dmt_modes =
sizeof(drm_dmt_modes) / sizeof(struct drm_display_mode);

struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
int hsize, int vsize, int fresh)
static struct drm_display_mode *drm_find_dmt(struct drm_device *dev,
int hsize, int vsize, int fresh)
{
int i;
struct drm_display_mode *ptr, *mode;
Expand All @@ -677,7 +677,6 @@ struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
}
return mode;
}
EXPORT_SYMBOL(drm_mode_find_dmt);

typedef void detailed_cb(struct detailed_timing *timing, void *closure);

Expand Down Expand Up @@ -867,7 +866,7 @@ drm_mode_std(struct drm_connector *connector, struct edid *edid,
}

/* check whether it can be found in default mode table */
mode = drm_mode_find_dmt(dev, hsize, vsize, vrefresh_rate);
mode = drm_find_dmt(dev, hsize, vsize, vrefresh_rate);
if (mode)
return mode;

Expand Down Expand Up @@ -1384,14 +1383,14 @@ drm_est3_modes(struct drm_connector *connector, struct detailed_timing *timing)
for (i = 0; i < 6; i++) {
for (j = 7; j > 0; j--) {
m = (i * 8) + (7 - j);
if (m >= num_est3_modes)
if (m > num_est3_modes)
break;
if (est[i] & (1 << j)) {
mode = drm_mode_find_dmt(connector->dev,
est3_modes[m].w,
est3_modes[m].h,
est3_modes[m].r
/*, est3_modes[m].rb */);
mode = drm_find_dmt(connector->dev,
est3_modes[m].w,
est3_modes[m].h,
est3_modes[m].r
/*, est3_modes[m].rb */);
if (mode) {
drm_mode_probed_add(connector, mode);
modes++;
Expand Down Expand Up @@ -1510,6 +1509,7 @@ static int add_detailed_info_eedid(struct drm_connector *connector,
char *edid_ext = NULL;
struct detailed_timing *timing;
int start_offset, end_offset;
int timing_level;

if (edid->version == 1 && edid->revision < 3)
return 0;
Expand All @@ -1536,6 +1536,7 @@ static int add_detailed_info_eedid(struct drm_connector *connector,
return 0;
}

timing_level = standard_timing_level(edid);
end_offset = EDID_LENGTH;
end_offset -= sizeof(struct detailed_timing);
for (i = start_offset; i < end_offset;
Expand Down
Loading

0 comments on commit 68b4189

Please sign in to comment.