mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
drm/i915: extract connector update from intel_ddc_get_modes() for reuse
Refactor the connector update part of intel_ddc_get_modes() into a separate intel_connector_update_modes() function for reuse. No functional changes. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45881 Tested-by: Alex Ferrando <alferpal@gmail.com> Cc: stable@vger.kernel.org (for 3.4+3.5) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
a843af186c
commit
4eab813664
2 changed files with 24 additions and 9 deletions
|
@ -342,6 +342,8 @@ struct intel_fbc_work {
|
||||||
int interval;
|
int interval;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int intel_connector_update_modes(struct drm_connector *connector,
|
||||||
|
struct edid *edid);
|
||||||
int intel_ddc_get_modes(struct drm_connector *c, struct i2c_adapter *adapter);
|
int intel_ddc_get_modes(struct drm_connector *c, struct i2c_adapter *adapter);
|
||||||
|
|
||||||
extern void intel_attach_force_audio_property(struct drm_connector *connector);
|
extern void intel_attach_force_audio_property(struct drm_connector *connector);
|
||||||
|
|
|
@ -32,6 +32,25 @@
|
||||||
#include "intel_drv.h"
|
#include "intel_drv.h"
|
||||||
#include "i915_drv.h"
|
#include "i915_drv.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* intel_connector_update_modes - update connector from edid
|
||||||
|
* @connector: DRM connector device to use
|
||||||
|
* @edid: previously read EDID information
|
||||||
|
*/
|
||||||
|
int intel_connector_update_modes(struct drm_connector *connector,
|
||||||
|
struct edid *edid)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
drm_mode_connector_update_edid_property(connector, edid);
|
||||||
|
ret = drm_add_edid_modes(connector, edid);
|
||||||
|
drm_edid_to_eld(connector, edid);
|
||||||
|
connector->display_info.raw_edid = NULL;
|
||||||
|
kfree(edid);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* intel_ddc_get_modes - get modelist from monitor
|
* intel_ddc_get_modes - get modelist from monitor
|
||||||
* @connector: DRM connector device to use
|
* @connector: DRM connector device to use
|
||||||
|
@ -43,18 +62,12 @@ int intel_ddc_get_modes(struct drm_connector *connector,
|
||||||
struct i2c_adapter *adapter)
|
struct i2c_adapter *adapter)
|
||||||
{
|
{
|
||||||
struct edid *edid;
|
struct edid *edid;
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
edid = drm_get_edid(connector, adapter);
|
edid = drm_get_edid(connector, adapter);
|
||||||
if (edid) {
|
if (!edid)
|
||||||
drm_mode_connector_update_edid_property(connector, edid);
|
return 0;
|
||||||
ret = drm_add_edid_modes(connector, edid);
|
|
||||||
drm_edid_to_eld(connector, edid);
|
|
||||||
connector->display_info.raw_edid = NULL;
|
|
||||||
kfree(edid);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return intel_connector_update_modes(connector, edid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct drm_prop_enum_list force_audio_names[] = {
|
static const struct drm_prop_enum_list force_audio_names[] = {
|
||||||
|
|
Loading…
Reference in a new issue