@@ -170,6 +170,15 @@ static int sti_atomic_check(struct drm_device *dev,
return ret;
}
+static int sti_drm_open(struct drm_device *ddev, struct drm_file *filp)
+{
+ struct sti_private *private = ddev->dev_private;
+
+ private->filp = filp;
+
+ return 0;
+}
+
static void sti_output_poll_changed(struct drm_device *ddev)
{
struct sti_private *private = ddev->dev_private;
@@ -226,6 +235,7 @@ static const struct file_operations sti_driver_fops = {
static struct drm_driver sti_driver = {
.driver_features = DRIVER_MODESET |
DRIVER_GEM | DRIVER_PRIME | DRIVER_ATOMIC,
+ .open = sti_drm_open,
.gem_free_object_unlocked = drm_gem_cma_free_object,
.gem_vm_ops = &drm_gem_cma_vm_ops,
.dumb_create = drm_gem_cma_dumb_create,
@@ -19,12 +19,15 @@ struct sti_tvout;
* @compo: compositor
* @plane_zorder_property: z-order property for CRTC planes
* @drm_dev: drm device
+ * @fbdev: framebuffer dev cma struct
+ * @drm_file: drm file private data
*/
struct sti_private {
struct sti_compositor *compo;
struct drm_property *plane_zorder_property;
struct drm_device *drm_dev;
struct drm_fbdev_cma *fbdev;
+ struct drm_file *filp;
};
extern struct platform_driver sti_tvout_driver;
Store the drm_file *filp in sti_private, so the driver can access more configuration information like the client capabilities. Change-Id: Ib8f305f1a41b4fdfe56f80294cd79e5dc44433ee Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> --- drivers/gpu/drm/sti/sti_drv.c | 10 ++++++++++ drivers/gpu/drm/sti/sti_drv.h | 3 +++ 2 files changed, 13 insertions(+)