What is the difference between o_direct and DAX with ext4 filesystem?

I'm trying to understand the difference between o_direct flag of open system call and dax (direct access) with ext4 filesystem.

According to my understanding both bypass page cache.

But I'm still unclear about the crucial difference between these 2 techniques. If there is a huge difference then what does it mean to use o_direct flag with DAX? Can anyone please explain about this in detail?

NOTE: Here I have partitioned a pmem device on top of DRAM using memmap parameter.

Usually, direct I/O is a bad idea. What are you attempting to accomplish? pmem uses DAX already.

DAX is intended for RAM or RAM-like devices with page sizes identical to the system page size. It avoids an extra copy-between-kernel step that may otherwise happen the first time a page is read using block devices, even RAM ones.

In other words, DAX is direct I/O specially optimized for RAM.