Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Lespiau, Damien and committed by
Dave Airlie
ae84b900 af3e95b4

+24 -22
+3 -3
drivers/gpu/host1x/drm/hdmi.c
··· 539 539 540 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 543 unsigned long value; 544 544 u8 buffer[10]; 545 545 ssize_t err; ··· 551 551 return; 552 552 } 553 553 554 - hdmi_hdmi_infoframe_init(&frame); 554 + hdmi_vendor_infoframe_init(&frame); 555 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 558 if (err < 0) { 559 559 dev_err(hdmi->dev, "failed to pack vendor infoframe: %zd\n", 560 560 err);
+13 -12
drivers/video/hdmi.c
··· 288 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 292 * @frame: HDMI vendor infoframe 293 293 * 294 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 298 memset(frame, 0, sizeof(*frame)); 299 299 ··· 310 310 311 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 317 * @frame: HDMI infoframe 318 318 * @buffer: destination buffer 319 319 * @size: size of buffer ··· 326 326 * Returns the number of bytes packed into the binary buffer or a negative 327 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 330 void *buffer, size_t size) 331 331 { 332 332 u8 *ptr = buffer; ··· 377 377 378 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, 386 - void *buffer, size_t size) 385 + static ssize_t 386 + hdmi_vendor_any_infoframe_pack(union hdmi_vendor_any_infoframe *frame, 387 + void *buffer, size_t size) 387 388 { 388 389 /* we only know about HDMI vendor infoframes */ 389 390 if (frame->any.oui != HDMI_IDENTIFIER) 390 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 /** ··· 423 422 length = hdmi_audio_infoframe_pack(&frame->audio, buffer, size); 424 423 break; 425 424 case HDMI_INFOFRAME_TYPE_VENDOR: 426 - length = hdmi_vendor_infoframe_pack(&frame->vendor, 427 - buffer, size); 425 + length = hdmi_vendor_any_infoframe_pack(&frame->vendor, 426 + buffer, size); 428 427 break; 429 428 default: 430 429 WARN(1, "Bad infoframe type %d\n", frame->any.type);
+8 -7
include/linux/hdmi.h
··· 237 237 HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF = 8, 238 238 }; 239 239 240 - struct hdmi_hdmi_infoframe { 240 + 241 + struct hdmi_vendor_infoframe { 241 242 enum hdmi_infoframe_type type; 242 243 unsigned char version; 243 244 unsigned char length; ··· 248 247 unsigned int s3d_ext_data; 249 248 }; 250 249 251 - int hdmi_hdmi_infoframe_init(struct hdmi_hdmi_infoframe *frame); 252 - ssize_t hdmi_hdmi_infoframe_pack(struct hdmi_hdmi_infoframe *frame, 253 - void *buffer, size_t size); 250 + int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe *frame); 251 + ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame, 252 + void *buffer, size_t size); 254 253 255 - union hdmi_vendor_infoframe { 254 + union hdmi_vendor_any_infoframe { 256 255 struct { 257 256 enum hdmi_infoframe_type type; 258 257 unsigned char version; 259 258 unsigned char length; 260 259 unsigned int oui; 261 260 } any; 262 - struct hdmi_hdmi_infoframe hdmi; 261 + struct hdmi_vendor_infoframe hdmi; 263 262 }; 264 263 265 264 union hdmi_infoframe { 266 265 struct hdmi_any_infoframe any; 267 266 struct hdmi_avi_infoframe avi; 268 267 struct hdmi_spd_infoframe spd; 269 - union hdmi_vendor_infoframe vendor; 268 + union hdmi_vendor_any_infoframe vendor; 270 269 struct hdmi_audio_infoframe audio; 271 270 }; 272 271