Message ID | 20240408170426.9285-15-ville.syrjala@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm: Increase COMPILE_TEST=y coverage | expand |
On 08/04/2024 20:04, Ville Syrjala wrote: > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > 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: Ville Syrjälä <ville.syrjala@linux.intel.com> > --- > drivers/gpu/drm/omapdrm/omap_gem.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c > index 3421e8389222..c4454e7f1c94 100644 > --- a/drivers/gpu/drm/omapdrm/omap_gem.c > +++ b/drivers/gpu/drm/omapdrm/omap_gem.c > @@ -1022,8 +1022,8 @@ struct sg_table *omap_gem_get_sg(struct drm_gem_object *obj, > > if (addr) { > for_each_sg(sgt->sgl, sg, count, i) { > - sg_set_page(sg, phys_to_page(addr), len, > - offset_in_page(addr)); > + sg_set_page(sg, pfn_to_page(__phys_to_pfn(addr)), > + len, offset_in_page(addr)); > sg_dma_address(sg) = addr; > sg_dma_len(sg) = len; > Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Tomi
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c index 3421e8389222..c4454e7f1c94 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -1022,8 +1022,8 @@ struct sg_table *omap_gem_get_sg(struct drm_gem_object *obj, if (addr) { for_each_sg(sgt->sgl, sg, count, i) { - sg_set_page(sg, phys_to_page(addr), len, - offset_in_page(addr)); + sg_set_page(sg, pfn_to_page(__phys_to_pfn(addr)), + len, offset_in_page(addr)); sg_dma_address(sg) = addr; sg_dma_len(sg) = len;