Commit 5bbad9e0 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/omap: Open code phys_to_page()

phys_to_page() is not available on most architectures.
Just open code it like msm does. Allows COMPILE_TEST=y
builds of omapdrm on other architectures.

Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240408170426.9285-15-ville.syrjala@linux.intel.comReviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
parent 8c59c870
...@@ -1022,8 +1022,8 @@ struct sg_table *omap_gem_get_sg(struct drm_gem_object *obj, ...@@ -1022,8 +1022,8 @@ struct sg_table *omap_gem_get_sg(struct drm_gem_object *obj,
if (addr) { if (addr) {
for_each_sg(sgt->sgl, sg, count, i) { for_each_sg(sgt->sgl, sg, count, i) {
sg_set_page(sg, phys_to_page(addr), len, sg_set_page(sg, pfn_to_page(__phys_to_pfn(addr)),
offset_in_page(addr)); len, offset_in_page(addr));
sg_dma_address(sg) = addr; sg_dma_address(sg) = addr;
sg_dma_len(sg) = len; sg_dma_len(sg) = len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment