diff options
Diffstat (limited to 'drivers/gpu/drm/gma500')
-rw-r--r-- | drivers/gpu/drm/gma500/framebuffer.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/intel_gmbus.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/psb_drv.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/psb_intel_sdvo.c | 28 |
4 files changed, 11 insertions, 32 deletions
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index 830dfdd6bf15..c1c4dc174fa2 100644 --- a/drivers/gpu/drm/gma500/framebuffer.c +++ b/drivers/gpu/drm/gma500/framebuffer.c | |||
@@ -507,11 +507,7 @@ static int psbfb_create(struct psb_fbdev *fbdev, | |||
507 | info->fix.mmio_start = pci_resource_start(dev->pdev, 0); | 507 | info->fix.mmio_start = pci_resource_start(dev->pdev, 0); |
508 | info->fix.mmio_len = pci_resource_len(dev->pdev, 0); | 508 | info->fix.mmio_len = pci_resource_len(dev->pdev, 0); |
509 | 509 | ||
510 | info->pixmap.size = 64 * 1024; | 510 | /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */ |
511 | info->pixmap.buf_align = 8; | ||
512 | info->pixmap.access_align = 32; | ||
513 | info->pixmap.flags = FB_PIXMAP_SYSTEM; | ||
514 | info->pixmap.scan_align = 1; | ||
515 | 511 | ||
516 | dev_info(dev->dev, "allocated %dx%d fb\n", | 512 | dev_info(dev->dev, "allocated %dx%d fb\n", |
517 | psbfb->base.width, psbfb->base.height); | 513 | psbfb->base.width, psbfb->base.height); |
@@ -725,10 +721,7 @@ static int psb_create_backlight_property(struct drm_device *dev) | |||
725 | if (dev_priv->backlight_property) | 721 | if (dev_priv->backlight_property) |
726 | return 0; | 722 | return 0; |
727 | 723 | ||
728 | backlight = drm_property_create(dev, DRM_MODE_PROP_RANGE, | 724 | backlight = drm_property_create_range(dev, 0, "backlight", 0, 100); |
729 | "backlight", 2); | ||
730 | backlight->values[0] = 0; | ||
731 | backlight->values[1] = 100; | ||
732 | 725 | ||
733 | dev_priv->backlight_property = backlight; | 726 | dev_priv->backlight_property = backlight; |
734 | 727 | ||
diff --git a/drivers/gpu/drm/gma500/intel_gmbus.c b/drivers/gpu/drm/gma500/intel_gmbus.c index 147584ac8d02..9db90527bf0f 100644 --- a/drivers/gpu/drm/gma500/intel_gmbus.c +++ b/drivers/gpu/drm/gma500/intel_gmbus.c | |||
@@ -395,7 +395,7 @@ int gma_intel_setup_gmbus(struct drm_device *dev) | |||
395 | struct drm_psb_private *dev_priv = dev->dev_private; | 395 | struct drm_psb_private *dev_priv = dev->dev_private; |
396 | int ret, i; | 396 | int ret, i; |
397 | 397 | ||
398 | dev_priv->gmbus = kcalloc(sizeof(struct intel_gmbus), GMBUS_NUM_PORTS, | 398 | dev_priv->gmbus = kcalloc(GMBUS_NUM_PORTS, sizeof(struct intel_gmbus), |
399 | GFP_KERNEL); | 399 | GFP_KERNEL); |
400 | if (dev_priv->gmbus == NULL) | 400 | if (dev_priv->gmbus == NULL) |
401 | return -ENOMEM; | 401 | return -ENOMEM; |
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c index f14768f2b364..1f57aac2cf80 100644 --- a/drivers/gpu/drm/gma500/psb_drv.c +++ b/drivers/gpu/drm/gma500/psb_drv.c | |||
@@ -283,6 +283,8 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset) | |||
283 | dev_priv->dev = dev; | 283 | dev_priv->dev = dev; |
284 | dev->dev_private = (void *) dev_priv; | 284 | dev->dev_private = (void *) dev_priv; |
285 | 285 | ||
286 | pci_set_master(dev->pdev); | ||
287 | |||
286 | if (!IS_PSB(dev)) { | 288 | if (!IS_PSB(dev)) { |
287 | if (pci_enable_msi(dev->pdev)) | 289 | if (pci_enable_msi(dev->pdev)) |
288 | dev_warn(dev->dev, "Enabling MSI failed!\n"); | 290 | dev_warn(dev->dev, "Enabling MSI failed!\n"); |
diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c index 88b42971c0fd..41b55d7a7bf8 100644 --- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c +++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c | |||
@@ -2312,10 +2312,8 @@ static bool psb_intel_sdvo_tv_create_property(struct psb_intel_sdvo *psb_intel_s | |||
2312 | psb_intel_sdvo_connector->max_##name = data_value[0]; \ | 2312 | psb_intel_sdvo_connector->max_##name = data_value[0]; \ |
2313 | psb_intel_sdvo_connector->cur_##name = response; \ | 2313 | psb_intel_sdvo_connector->cur_##name = response; \ |
2314 | psb_intel_sdvo_connector->name = \ | 2314 | psb_intel_sdvo_connector->name = \ |
2315 | drm_property_create(dev, DRM_MODE_PROP_RANGE, #name, 2); \ | 2315 | drm_property_create_range(dev, 0, #name, 0, data_value[0]); \ |
2316 | if (!psb_intel_sdvo_connector->name) return false; \ | 2316 | if (!psb_intel_sdvo_connector->name) return false; \ |
2317 | psb_intel_sdvo_connector->name->values[0] = 0; \ | ||
2318 | psb_intel_sdvo_connector->name->values[1] = data_value[0]; \ | ||
2319 | drm_connector_attach_property(connector, \ | 2317 | drm_connector_attach_property(connector, \ |
2320 | psb_intel_sdvo_connector->name, \ | 2318 | psb_intel_sdvo_connector->name, \ |
2321 | psb_intel_sdvo_connector->cur_##name); \ | 2319 | psb_intel_sdvo_connector->cur_##name); \ |
@@ -2349,25 +2347,19 @@ psb_intel_sdvo_create_enhance_property_tv(struct psb_intel_sdvo *psb_intel_sdvo, | |||
2349 | psb_intel_sdvo_connector->left_margin = data_value[0] - response; | 2347 | psb_intel_sdvo_connector->left_margin = data_value[0] - response; |
2350 | psb_intel_sdvo_connector->right_margin = psb_intel_sdvo_connector->left_margin; | 2348 | psb_intel_sdvo_connector->right_margin = psb_intel_sdvo_connector->left_margin; |
2351 | psb_intel_sdvo_connector->left = | 2349 | psb_intel_sdvo_connector->left = |
2352 | drm_property_create(dev, DRM_MODE_PROP_RANGE, | 2350 | drm_property_create_range(dev, 0, "left_margin", 0, data_value[0]); |
2353 | "left_margin", 2); | ||
2354 | if (!psb_intel_sdvo_connector->left) | 2351 | if (!psb_intel_sdvo_connector->left) |
2355 | return false; | 2352 | return false; |
2356 | 2353 | ||
2357 | psb_intel_sdvo_connector->left->values[0] = 0; | ||
2358 | psb_intel_sdvo_connector->left->values[1] = data_value[0]; | ||
2359 | drm_connector_attach_property(connector, | 2354 | drm_connector_attach_property(connector, |
2360 | psb_intel_sdvo_connector->left, | 2355 | psb_intel_sdvo_connector->left, |
2361 | psb_intel_sdvo_connector->left_margin); | 2356 | psb_intel_sdvo_connector->left_margin); |
2362 | 2357 | ||
2363 | psb_intel_sdvo_connector->right = | 2358 | psb_intel_sdvo_connector->right = |
2364 | drm_property_create(dev, DRM_MODE_PROP_RANGE, | 2359 | drm_property_create_range(dev, 0, "right_margin", 0, data_value[0]); |
2365 | "right_margin", 2); | ||
2366 | if (!psb_intel_sdvo_connector->right) | 2360 | if (!psb_intel_sdvo_connector->right) |
2367 | return false; | 2361 | return false; |
2368 | 2362 | ||
2369 | psb_intel_sdvo_connector->right->values[0] = 0; | ||
2370 | psb_intel_sdvo_connector->right->values[1] = data_value[0]; | ||
2371 | drm_connector_attach_property(connector, | 2363 | drm_connector_attach_property(connector, |
2372 | psb_intel_sdvo_connector->right, | 2364 | psb_intel_sdvo_connector->right, |
2373 | psb_intel_sdvo_connector->right_margin); | 2365 | psb_intel_sdvo_connector->right_margin); |
@@ -2391,25 +2383,19 @@ psb_intel_sdvo_create_enhance_property_tv(struct psb_intel_sdvo *psb_intel_sdvo, | |||
2391 | psb_intel_sdvo_connector->top_margin = data_value[0] - response; | 2383 | psb_intel_sdvo_connector->top_margin = data_value[0] - response; |
2392 | psb_intel_sdvo_connector->bottom_margin = psb_intel_sdvo_connector->top_margin; | 2384 | psb_intel_sdvo_connector->bottom_margin = psb_intel_sdvo_connector->top_margin; |
2393 | psb_intel_sdvo_connector->top = | 2385 | psb_intel_sdvo_connector->top = |
2394 | drm_property_create(dev, DRM_MODE_PROP_RANGE, | 2386 | drm_property_create_range(dev, 0, "top_margin", 0, data_value[0]); |
2395 | "top_margin", 2); | ||
2396 | if (!psb_intel_sdvo_connector->top) | 2387 | if (!psb_intel_sdvo_connector->top) |
2397 | return false; | 2388 | return false; |
2398 | 2389 | ||
2399 | psb_intel_sdvo_connector->top->values[0] = 0; | ||
2400 | psb_intel_sdvo_connector->top->values[1] = data_value[0]; | ||
2401 | drm_connector_attach_property(connector, | 2390 | drm_connector_attach_property(connector, |
2402 | psb_intel_sdvo_connector->top, | 2391 | psb_intel_sdvo_connector->top, |
2403 | psb_intel_sdvo_connector->top_margin); | 2392 | psb_intel_sdvo_connector->top_margin); |
2404 | 2393 | ||
2405 | psb_intel_sdvo_connector->bottom = | 2394 | psb_intel_sdvo_connector->bottom = |
2406 | drm_property_create(dev, DRM_MODE_PROP_RANGE, | 2395 | drm_property_create_range(dev, 0, "bottom_margin", 0, data_value[0]); |
2407 | "bottom_margin", 2); | ||
2408 | if (!psb_intel_sdvo_connector->bottom) | 2396 | if (!psb_intel_sdvo_connector->bottom) |
2409 | return false; | 2397 | return false; |
2410 | 2398 | ||
2411 | psb_intel_sdvo_connector->bottom->values[0] = 0; | ||
2412 | psb_intel_sdvo_connector->bottom->values[1] = data_value[0]; | ||
2413 | drm_connector_attach_property(connector, | 2399 | drm_connector_attach_property(connector, |
2414 | psb_intel_sdvo_connector->bottom, | 2400 | psb_intel_sdvo_connector->bottom, |
2415 | psb_intel_sdvo_connector->bottom_margin); | 2401 | psb_intel_sdvo_connector->bottom_margin); |
@@ -2438,12 +2424,10 @@ psb_intel_sdvo_create_enhance_property_tv(struct psb_intel_sdvo *psb_intel_sdvo, | |||
2438 | psb_intel_sdvo_connector->max_dot_crawl = 1; | 2424 | psb_intel_sdvo_connector->max_dot_crawl = 1; |
2439 | psb_intel_sdvo_connector->cur_dot_crawl = response & 0x1; | 2425 | psb_intel_sdvo_connector->cur_dot_crawl = response & 0x1; |
2440 | psb_intel_sdvo_connector->dot_crawl = | 2426 | psb_intel_sdvo_connector->dot_crawl = |
2441 | drm_property_create(dev, DRM_MODE_PROP_RANGE, "dot_crawl", 2); | 2427 | drm_property_create_range(dev, 0, "dot_crawl", 0, 1); |
2442 | if (!psb_intel_sdvo_connector->dot_crawl) | 2428 | if (!psb_intel_sdvo_connector->dot_crawl) |
2443 | return false; | 2429 | return false; |
2444 | 2430 | ||
2445 | psb_intel_sdvo_connector->dot_crawl->values[0] = 0; | ||
2446 | psb_intel_sdvo_connector->dot_crawl->values[1] = 1; | ||
2447 | drm_connector_attach_property(connector, | 2431 | drm_connector_attach_property(connector, |
2448 | psb_intel_sdvo_connector->dot_crawl, | 2432 | psb_intel_sdvo_connector->dot_crawl, |
2449 | psb_intel_sdvo_connector->cur_dot_crawl); | 2433 | psb_intel_sdvo_connector->cur_dot_crawl); |