Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358371
b: refs/heads/master
c: 10a8512
h: refs/heads/master
i:
  358369: 055c858
  358367: f797d1d
v: v3
  • Loading branch information
Thierry Reding committed Feb 22, 2013
1 parent d5af4c5 commit cfbcb22
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f142d3bd556c5e82e9bb3d33d07d6708702ea4ce
refs/heads/master: 10a8512008655d5ce62f8c56323a6b5bd221c920
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
menuconfig DRM
tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && MMU
select HDMI
select I2C
select I2C_ALGOBIT
select DMA_SHARED_BUFFER
Expand Down
33 changes: 33 additions & 0 deletions trunk/drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*/
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/hdmi.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <drm/drmP.h>
Expand Down Expand Up @@ -2856,3 +2857,35 @@ int drm_add_modes_noedid(struct drm_connector *connector,
return num_modes;
}
EXPORT_SYMBOL(drm_add_modes_noedid);

/**
* drm_hdmi_avi_infoframe_from_display_mode() - fill an HDMI AVI infoframe with
* data from a DRM display mode
* @frame: HDMI AVI infoframe
* @mode: DRM display mode
*
* Returns 0 on success or a negative error code on failure.
*/
int
drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
const struct drm_display_mode *mode)
{
int err;

if (!frame || !mode)
return -EINVAL;

err = hdmi_avi_infoframe_init(frame);
if (err < 0)
return err;

frame->video_code = drm_match_cea_mode(mode);
if (!frame->video_code)
return 0;

frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;

return 0;
}
EXPORT_SYMBOL(drm_hdmi_avi_infoframe_from_display_mode);
6 changes: 6 additions & 0 deletions trunk/include/drm/drm_edid.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,17 @@ struct edid {
struct drm_encoder;
struct drm_connector;
struct drm_display_mode;
struct hdmi_avi_infoframe;

void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid);
int drm_av_sync_delay(struct drm_connector *connector,
struct drm_display_mode *mode);
struct drm_connector *drm_select_eld(struct drm_encoder *encoder,
struct drm_display_mode *mode);
int drm_load_edid_firmware(struct drm_connector *connector);

int
drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
const struct drm_display_mode *mode);

#endif /* __DRM_EDID_H__ */

0 comments on commit cfbcb22

Please sign in to comment.