Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345147
b: refs/heads/master
c: 1d50870
h: refs/heads/master
i:
  345145: 658f6f4
  345143: c838bc8
v: v3
  • Loading branch information
Jani Nikula authored and Daniel Vetter committed Oct 22, 2012
1 parent cd52b0f commit 479b21f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 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: f8779fda5776dfb9369ec09fc21745c9d8057e81
refs/heads/master: 1d508706ea848e32ff20bb311f4325896c6eb7b9
9 changes: 7 additions & 2 deletions trunk/drivers/gpu/drm/i915/intel_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2497,9 +2497,12 @@ intel_dp_destroy(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
struct intel_dp *intel_dp = intel_attached_dp(connector);
struct intel_connector *intel_connector = to_intel_connector(connector);

if (is_edp(intel_dp))
if (is_edp(intel_dp)) {
intel_panel_destroy_backlight(dev);
intel_panel_fini(&intel_connector->panel);
}

drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
Expand Down Expand Up @@ -2828,8 +2831,10 @@ intel_dp_init(struct drm_device *dev, int output_reg, enum port port)

intel_encoder->hot_plug = intel_dp_hot_plug;

if (is_edp(intel_dp))
if (is_edp(intel_dp)) {
intel_panel_init(&intel_connector->panel);
intel_panel_setup_backlight(connector);
}

intel_dp_add_properties(intel_dp, connector);

Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/gpu/drm/i915/intel_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ struct intel_encoder {
int crtc_mask;
};

struct intel_panel {
};

struct intel_connector {
struct drm_connector base;
/*
Expand All @@ -179,6 +182,9 @@ struct intel_connector {
/* Reads out the current hw, returning true if the connector is enabled
* and active (i.e. dpms ON state). */
bool (*get_hw_state)(struct intel_connector *);

/* Panel info for eDP and LVDS */
struct intel_panel panel;
};

struct intel_crtc {
Expand Down Expand Up @@ -436,6 +442,9 @@ extern void intel_flush_display_plane(struct drm_i915_private *dev_priv,
enum plane plane);

/* intel_panel.c */
extern int intel_panel_init(struct intel_panel *panel);
extern void intel_panel_fini(struct intel_panel *panel);

extern void intel_fixed_panel_mode(struct drm_display_mode *fixed_mode,
struct drm_display_mode *adjusted_mode);
extern void intel_pch_panel_fitting(struct drm_device *dev,
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/gpu/drm/i915/intel_lvds.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ static void intel_lvds_destroy(struct drm_connector *connector)
acpi_lid_notifier_unregister(&lvds_connector->lid_notifier);

intel_panel_destroy_backlight(connector->dev);
intel_panel_fini(&lvds_connector->base.panel);

drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
Expand Down Expand Up @@ -1106,6 +1107,7 @@ bool intel_lvds_init(struct drm_device *dev)
}
drm_sysfs_connector_add(connector);

intel_panel_init(&intel_connector->panel);
intel_panel_setup_backlight(connector);

return true;
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/gpu/drm/i915/intel_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,3 +464,12 @@ void intel_panel_destroy_backlight(struct drm_device *dev)
return;
}
#endif

int intel_panel_init(struct intel_panel *panel)
{
return 0;
}

void intel_panel_fini(struct intel_panel *panel)
{
}

0 comments on commit 479b21f

Please sign in to comment.