diff options
author | Lespiau, Damien <damien.lespiau@intel.com> | 2013-08-19 11:59:02 -0400 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2013-08-29 18:41:42 -0400 |
commit | ae84b900b009589a7017a1f8f060edd7de501642 (patch) | |
tree | 2e7aba702d9c2c95510f271fa9c8b1fa751810ea /drivers | |
parent | af3e95b40720cdf301eb85387c0a3dc4067cc551 (diff) |
video/hdmi: Use hdmi_vendor_infoframe for the HDMI specific infoframe
We just got rid of the version of hdmi_vendor_infoframe that had a byte
array for anyone to poke at. It's now time to shuffle around the naming
of hdmi_hdmi_infoframe to make hdmi_vendor_infoframe become the HDMI
vendor specific structure.
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/host1x/drm/hdmi.c | 6 | ||||
-rw-r--r-- | drivers/video/hdmi.c | 25 |
2 files changed, 16 insertions, 15 deletions
diff --git a/drivers/gpu/host1x/drm/hdmi.c b/drivers/gpu/host1x/drm/hdmi.c index b5489187a163..52e3c9641a0f 100644 --- a/drivers/gpu/host1x/drm/hdmi.c +++ b/drivers/gpu/host1x/drm/hdmi.c | |||
@@ -539,7 +539,7 @@ static void tegra_hdmi_setup_audio_infoframe(struct tegra_hdmi *hdmi) | |||
539 | 539 | ||
540 | static void tegra_hdmi_setup_stereo_infoframe(struct tegra_hdmi *hdmi) | 540 | static void tegra_hdmi_setup_stereo_infoframe(struct tegra_hdmi *hdmi) |
541 | { | 541 | { |
542 | struct hdmi_hdmi_infoframe frame; | 542 | struct hdmi_vendor_infoframe frame; |
543 | unsigned long value; | 543 | unsigned long value; |
544 | u8 buffer[10]; | 544 | u8 buffer[10]; |
545 | ssize_t err; | 545 | ssize_t err; |
@@ -551,10 +551,10 @@ static void tegra_hdmi_setup_stereo_infoframe(struct tegra_hdmi *hdmi) | |||
551 | return; | 551 | return; |
552 | } | 552 | } |
553 | 553 | ||
554 | hdmi_hdmi_infoframe_init(&frame); | 554 | hdmi_vendor_infoframe_init(&frame); |
555 | frame.s3d_struct = HDMI_3D_STRUCTURE_FRAME_PACKING; | 555 | frame.s3d_struct = HDMI_3D_STRUCTURE_FRAME_PACKING; |
556 | 556 | ||
557 | err = hdmi_hdmi_infoframe_pack(&frame, buffer, sizeof(buffer)); | 557 | err = hdmi_vendor_infoframe_pack(&frame, buffer, sizeof(buffer)); |
558 | if (err < 0) { | 558 | if (err < 0) { |
559 | dev_err(hdmi->dev, "failed to pack vendor infoframe: %zd\n", | 559 | dev_err(hdmi->dev, "failed to pack vendor infoframe: %zd\n", |
560 | err); | 560 | err); |
diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c index fbccb88c2620..4f73167c8647 100644 --- a/drivers/video/hdmi.c +++ b/drivers/video/hdmi.c | |||
@@ -288,12 +288,12 @@ ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe *frame, | |||
288 | EXPORT_SYMBOL(hdmi_audio_infoframe_pack); | 288 | EXPORT_SYMBOL(hdmi_audio_infoframe_pack); |
289 | 289 | ||
290 | /** | 290 | /** |
291 | * hdmi_hdmi_infoframe_init() - initialize an HDMI vendor infoframe | 291 | * hdmi_vendor_infoframe_init() - initialize an HDMI vendor infoframe |
292 | * @frame: HDMI vendor infoframe | 292 | * @frame: HDMI vendor infoframe |
293 | * | 293 | * |
294 | * Returns 0 on success or a negative error code on failure. | 294 | * Returns 0 on success or a negative error code on failure. |
295 | */ | 295 | */ |
296 | int hdmi_hdmi_infoframe_init(struct hdmi_hdmi_infoframe *frame) | 296 | int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe *frame) |
297 | { | 297 | { |
298 | memset(frame, 0, sizeof(*frame)); | 298 | memset(frame, 0, sizeof(*frame)); |
299 | 299 | ||
@@ -310,10 +310,10 @@ int hdmi_hdmi_infoframe_init(struct hdmi_hdmi_infoframe *frame) | |||
310 | 310 | ||
311 | return 0; | 311 | return 0; |
312 | } | 312 | } |
313 | EXPORT_SYMBOL(hdmi_hdmi_infoframe_init); | 313 | EXPORT_SYMBOL(hdmi_vendor_infoframe_init); |
314 | 314 | ||
315 | /** | 315 | /** |
316 | * hdmi_hdmi_infoframe_pack() - write a HDMI vendor infoframe to binary buffer | 316 | * hdmi_vendor_infoframe_pack() - write a HDMI vendor infoframe to binary buffer |
317 | * @frame: HDMI infoframe | 317 | * @frame: HDMI infoframe |
318 | * @buffer: destination buffer | 318 | * @buffer: destination buffer |
319 | * @size: size of buffer | 319 | * @size: size of buffer |
@@ -326,7 +326,7 @@ EXPORT_SYMBOL(hdmi_hdmi_infoframe_init); | |||
326 | * Returns the number of bytes packed into the binary buffer or a negative | 326 | * Returns the number of bytes packed into the binary buffer or a negative |
327 | * error code on failure. | 327 | * error code on failure. |
328 | */ | 328 | */ |
329 | ssize_t hdmi_hdmi_infoframe_pack(struct hdmi_hdmi_infoframe *frame, | 329 | ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame, |
330 | void *buffer, size_t size) | 330 | void *buffer, size_t size) |
331 | { | 331 | { |
332 | u8 *ptr = buffer; | 332 | u8 *ptr = buffer; |
@@ -377,19 +377,20 @@ ssize_t hdmi_hdmi_infoframe_pack(struct hdmi_hdmi_infoframe *frame, | |||
377 | 377 | ||
378 | return length; | 378 | return length; |
379 | } | 379 | } |
380 | EXPORT_SYMBOL(hdmi_hdmi_infoframe_pack); | 380 | EXPORT_SYMBOL(hdmi_vendor_infoframe_pack); |
381 | 381 | ||
382 | /* | 382 | /* |
383 | * hdmi_vendor_infoframe_pack() - write a vendor infoframe to binary buffer | 383 | * hdmi_vendor_any_infoframe_pack() - write a vendor infoframe to binary buffer |
384 | */ | 384 | */ |
385 | static ssize_t hdmi_vendor_infoframe_pack(union hdmi_vendor_infoframe *frame, | 385 | static ssize_t |
386 | void *buffer, size_t size) | 386 | hdmi_vendor_any_infoframe_pack(union hdmi_vendor_any_infoframe *frame, |
387 | void *buffer, size_t size) | ||
387 | { | 388 | { |
388 | /* we only know about HDMI vendor infoframes */ | 389 | /* we only know about HDMI vendor infoframes */ |
389 | if (frame->any.oui != HDMI_IDENTIFIER) | 390 | if (frame->any.oui != HDMI_IDENTIFIER) |
390 | return -EINVAL; | 391 | return -EINVAL; |
391 | 392 | ||
392 | return hdmi_hdmi_infoframe_pack(&frame->hdmi, buffer, size); | 393 | return hdmi_vendor_infoframe_pack(&frame->hdmi, buffer, size); |
393 | } | 394 | } |
394 | 395 | ||
395 | /** | 396 | /** |
@@ -422,8 +423,8 @@ hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer, size_t size) | |||
422 | length = hdmi_audio_infoframe_pack(&frame->audio, buffer, size); | 423 | length = hdmi_audio_infoframe_pack(&frame->audio, buffer, size); |
423 | break; | 424 | break; |
424 | case HDMI_INFOFRAME_TYPE_VENDOR: | 425 | case HDMI_INFOFRAME_TYPE_VENDOR: |
425 | length = hdmi_vendor_infoframe_pack(&frame->vendor, | 426 | length = hdmi_vendor_any_infoframe_pack(&frame->vendor, |
426 | buffer, size); | 427 | buffer, size); |
427 | break; | 428 | break; |
428 | default: | 429 | default: |
429 | WARN(1, "Bad infoframe type %d\n", frame->any.type); | 430 | WARN(1, "Bad infoframe type %d\n", frame->any.type); |