Edge2 - Dynamic DPI Change

Hi

Any patch to set Android 14 dpi dynamically?
Eg. I set resolution and framebuffer to 3840x2160 then I want dpi to change to 640.
If resolution and framebuffer is changed to 1920x1080 then I want dpi to change to 320 automatically.
For lower resolutions want dpi to change to 240.

@mo123 ,
Do you meet your need by setting up through the following path?
Settings->System->Developer options->Smallest width.

If I connect to a 4K tv I want Android to automatically use or set
3840x2160@60hz and 640dpi.

If connecting same Edge2 Android 14 to a 1080p display I want it to automatically use or set 1920x1080p@60hz and use 320dpi.

In build.prop persist.ro.sf.lcd_density=320 is set so it is always used for all display sizes.
I don’t want to manually change it for different displays.

I think it can meet this requirement, but it may need to be restarted.