framebuffer.c (c89717bd0a0f4fd35e86ea26072de608482a7710) framebuffer.c (b1a7d0ddb169774c3db5afe9e64124daea7fdd9f)
1// SPDX-License-Identifier: GPL-2.0-only
2/**************************************************************************
3 * Copyright (c) 2007-2011, Intel Corporation.
4 * All Rights Reserved.
5 *
6 **************************************************************************/
7
8#include <linux/console.h>

--- 437 unchanged lines hidden (view full) ---

446static const struct drm_mode_config_funcs psb_mode_funcs = {
447 .fb_create = psb_user_framebuffer_create,
448 .output_poll_changed = drm_fb_helper_output_poll_changed,
449};
450
451static void psb_setup_outputs(struct drm_device *dev)
452{
453 struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
1// SPDX-License-Identifier: GPL-2.0-only
2/**************************************************************************
3 * Copyright (c) 2007-2011, Intel Corporation.
4 * All Rights Reserved.
5 *
6 **************************************************************************/
7
8#include <linux/console.h>

--- 437 unchanged lines hidden (view full) ---

446static const struct drm_mode_config_funcs psb_mode_funcs = {
447 .fb_create = psb_user_framebuffer_create,
448 .output_poll_changed = drm_fb_helper_output_poll_changed,
449};
450
451static void psb_setup_outputs(struct drm_device *dev)
452{
453 struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
454 struct drm_connector_list_iter conn_iter;
454 struct drm_connector *connector;
455
456 drm_mode_create_scaling_mode_property(dev);
457
458 /* It is ok for this to fail - we just don't get backlight control */
459 if (!dev_priv->backlight_property)
460 dev_priv->backlight_property = drm_property_create_range(dev, 0,
461 "backlight", 0, 100);
462 dev_priv->ops->output_init(dev);
463
455 struct drm_connector *connector;
456
457 drm_mode_create_scaling_mode_property(dev);
458
459 /* It is ok for this to fail - we just don't get backlight control */
460 if (!dev_priv->backlight_property)
461 dev_priv->backlight_property = drm_property_create_range(dev, 0,
462 "backlight", 0, 100);
463 dev_priv->ops->output_init(dev);
464
464 list_for_each_entry(connector, &dev->mode_config.connector_list,
465 head) {
465 drm_connector_list_iter_begin(dev, &conn_iter);
466 drm_for_each_connector_iter(connector, &conn_iter) {
466 struct gma_encoder *gma_encoder = gma_attached_encoder(connector);
467 struct drm_encoder *encoder = &gma_encoder->base;
468 int crtc_mask = 0, clone_mask = 0;
469
470 /* valid crtcs */
471 switch (gma_encoder->type) {
472 case INTEL_OUTPUT_ANALOG:
473 crtc_mask = (1 << 0);

--- 26 unchanged lines hidden (view full) ---

500 case INTEL_OUTPUT_EDP:
501 crtc_mask = (1 << 1);
502 clone_mask = 0;
503 }
504 encoder->possible_crtcs = crtc_mask;
505 encoder->possible_clones =
506 gma_connector_clones(dev, clone_mask);
507 }
467 struct gma_encoder *gma_encoder = gma_attached_encoder(connector);
468 struct drm_encoder *encoder = &gma_encoder->base;
469 int crtc_mask = 0, clone_mask = 0;
470
471 /* valid crtcs */
472 switch (gma_encoder->type) {
473 case INTEL_OUTPUT_ANALOG:
474 crtc_mask = (1 << 0);

--- 26 unchanged lines hidden (view full) ---

501 case INTEL_OUTPUT_EDP:
502 crtc_mask = (1 << 1);
503 clone_mask = 0;
504 }
505 encoder->possible_crtcs = crtc_mask;
506 encoder->possible_clones =
507 gma_connector_clones(dev, clone_mask);
508 }
509 drm_connector_list_iter_end(&conn_iter);
508}
509
510void psb_modeset_init(struct drm_device *dev)
511{
512 struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
513 struct psb_intel_mode_device *mode_dev = &dev_priv->mode_dev;
514 struct pci_dev *pdev = to_pci_dev(dev->dev);
515 int i;

--- 36 unchanged lines hidden ---
510}
511
512void psb_modeset_init(struct drm_device *dev)
513{
514 struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
515 struct psb_intel_mode_device *mode_dev = &dev_priv->mode_dev;
516 struct pci_dev *pdev = to_pci_dev(dev->dev);
517 int i;

--- 36 unchanged lines hidden ---