public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* question about V4L2_MEMORY_USERPTR on 64bit applications
@ 2018-10-12  3:04 Zhang, Ning A
  2018-10-12  3:25 ` Bing Bu Cao
  2018-10-12  4:33 ` Zhang, Ning A
  0 siblings, 2 replies; 5+ messages in thread
From: Zhang, Ning A @ 2018-10-12  3:04 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org

Hi,

I have question about V4L2_MEMORY_USERPTR on 64bit applications.

struct v4l2_buffer {
	__u32			index;
	__u32			type;
	__u32			bytesused;
	__u32			flags;
	__u32			field;
	struct timeval		timestamp;
	struct v4l2_timecode	timecode;
	__u32			sequence;

	/* memory location */
	__u32			memory;
	union {
		__u32           offset;
		unsigned long   userptr;   <<<--- this is a 32bit addr.
		struct v4l2_plane *planes;
		__s32		fd;
	} m;
	__u32			length;
	__u32			reserved2;
	__u32			reserved;
};

when use a 64bit application, memory from malloc is 64bit address.
memory from GPU (eg, intel i915) are also 64bit address.

when use these kind of memory as V4L2_MEMORY_USERPTR, address will be
truncated into 32bit.

this would be error, but actually not. I really don't understand.

BR.
Ning.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-14  7:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-12  3:04 question about V4L2_MEMORY_USERPTR on 64bit applications Zhang, Ning A
2018-10-12  3:25 ` Bing Bu Cao
2018-10-12  4:33 ` Zhang, Ning A
2018-10-12  5:22   ` tbhardwa
2018-10-14  0:11     ` Eugene Syromiatnikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox