-
Notifications
You must be signed in to change notification settings - Fork 10
drm/verisilicon: unconditionally use the DC device as dma_dev #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drm/verisilicon: unconditionally use the DC device as dma_dev #31
Conversation
As the display-subsystem is outside of the soc device tree node (where the dma-noncoherent property is added), it's assumed to be coherent, and lead to allocated memory being not properly mapped (still cached). Unconditionally use the DC device (which is in the soc node) as dma_dev to fix framebuffer mapping issue. Signed-off-by: Icenowy Zheng <[email protected]>
Reviewer's GuideThis PR ensures the DC device is always used as the DMA device by assigning dma_dev before any IOMMU checks and refining detach logic, renames the IOMMU-specific attach/detach APIs to reflect DMA semantics, and updates the DC driver to invoke the new DMA functions with corrected log messages. Class diagram for updated DMA attach/detach API in Verisilicon DRM driverclassDiagram
class vs_drm_private {
+struct device *dma_dev
+struct iommu_domain *domain
+unsigned int pitch_alignment
}
class drm_device {
+void *dev_private
+struct device *dev
}
vs_drm_private <.. drm_device : dev_private
class vs_drm_dma_attach_device {
+int vs_drm_dma_attach_device(struct drm_device *drm_dev, struct device *dev)
}
class vs_drm_dma_detach_device {
+void vs_drm_dma_detach_device(struct drm_device *drm_dev, struct device *dev)
}
drm_device <.. vs_drm_dma_attach_device
drm_device <.. vs_drm_dma_detach_device
Class diagram for DC device binding and DMA device assignmentclassDiagram
class dc_bind {
+int dc_bind(struct device *dev, struct device *master, void *data)
}
class dc_unbind {
+void dc_unbind(struct device *dev, struct device *master, void *data)
}
class vs_drm_dma_attach_device {
+int vs_drm_dma_attach_device(struct drm_device *drm_dev, struct device *dev)
}
class vs_drm_dma_detach_device {
+void vs_drm_dma_detach_device(struct drm_device *drm_dev, struct device *dev)
}
dc_bind --> vs_drm_dma_attach_device : calls
dc_unbind --> vs_drm_dma_detach_device : calls
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the display-subsystem is outside of the soc device tree node (where the dma-noncoherent property is added), it's assumed to be coherent, and lead to allocated memory being not properly mapped (still cached).
Unconditionally use the DC device (which is in the soc node) as dma_dev to fix framebuffer mapping issue.
Summary by Sourcery
Always use the DC device as the DMA device in Verisilicon DRM to ensure proper framebuffer mapping and reflect that change in function naming.
Bug Fixes:
Enhancements: