From: Fabien Dessenne <fabien.dessenne@st.com>
To: dri-devel@lists.freedesktop.org
Cc: Vincent Abriou <vincent.abriou@st.com>, kernel@stlinux.com
Subject: [PATCH 2/5] drm/sti: add drm_file to sti_private
Date: Tue, 3 Jan 2017 17:56:49 +0100 [thread overview]
Message-ID: <1483462612-29448-3-git-send-email-fabien.dessenne@st.com> (raw)
In-Reply-To: <1483462612-29448-1-git-send-email-fabien.dessenne@st.com>
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(+)
diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
index 9a9b9a2..63febf8 100644
--- a/drivers/gpu/drm/sti/sti_drv.c
+++ b/drivers/gpu/drm/sti/sti_drv.c
@@ -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,
diff --git a/drivers/gpu/drm/sti/sti_drv.h b/drivers/gpu/drm/sti/sti_drv.h
index f9276cd..de22b0d 100644
--- a/drivers/gpu/drm/sti/sti_drv.h
+++ b/drivers/gpu/drm/sti/sti_drv.h
@@ -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;
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-01-03 16:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-03 16:56 [PATCH 0/5] drm/sti: do not sync legacy IOCTL on vblank if not ATOMIC Fabien Dessenne
2017-01-03 16:56 ` [PATCH 1/5] drm/sti: use atomic_helper for commit Fabien Dessenne
2017-01-03 16:56 ` Fabien Dessenne [this message]
2017-01-03 16:56 ` [PATCH 3/5] drm/sti: do not sync SETPLANE on vblank if not ATOMIC Fabien Dessenne
2017-01-03 16:56 ` [PATCH 4/5] drm/sti: do not sync SETPROPERTY " Fabien Dessenne
2017-01-03 16:56 ` [PATCH 5/5] drm/sti: do not check hw scaling if mode is not set Fabien Dessenne
2017-01-04 9:18 ` [PATCH 0/5] drm/sti: do not sync legacy IOCTL on vblank if not ATOMIC Daniel Vetter
2017-01-05 15:23 ` Fabien DESSENNE
2017-01-09 10:03 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1483462612-29448-3-git-send-email-fabien.dessenne@st.com \
--to=fabien.dessenne@st.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@stlinux.com \
--cc=vincent.abriou@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox