All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] RFC: Add a drm_aux-dev module.
@ 2015-09-14 23:12 Rafael Antognolli
  2015-09-14 23:12 ` [PATCH 1/3] drm/dp: Keep a list of drm_dp_aux helper Rafael Antognolli
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Rafael Antognolli @ 2015-09-14 23:12 UTC (permalink / raw)
  To: dri-devel; +Cc: daniel.vetter

This is a tentative implementation of a module that allows reading/writing
arbitrary dpcd registers, following the suggestion from Daniel Vetter. It
assumes the drm aux helpers were used by the driver.

I tried to follow the i2c-dev implementation as close as possible, but the only
operations that are provided on the dev node are two different ioctl's, one for
reading a register and another one for writing it.

I have at least 2 open questions:

 * Right now the AUX channels are stored in a global list inside the
   drm_dp_helper implementation, and I assume that's not ideal. A different
   approach would be to iterate over the list of connectors, instead of the
   list of AUX channels, but that would require the struct drm_connector or
   similar to know about the respective aux helper. It could be added as a
   function to register that, or as a new method on the drm_connector_funcs to
   retrieve the aux channel helper.

 * From the created sysfs drm_aux-dev device it's possible to know what is the
   respective connector, but not the other way around. Is this good enough?

Please provide any feedback you have and tell me if this is the idea you had
initially for this kind of implementation. Or, if it's nothing like this, let
me know what else you had in mind.

If I'm going in the right direction, I'll refine the patch to provide full
documentation and tests if needed.

Rafael Antognolli (3):
  drm/dp: Keep a list of drm_dp_aux helper.
  drm/dp: Store the drm_connector device pointer on the helper.
  drm/dp: Add a drm_aux-dev module for reading/writing dpcd registers.

 Documentation/ioctl/ioctl-number.txt |   1 +
 drivers/gpu/drm/Kconfig              |   4 +
 drivers/gpu/drm/Makefile             |   1 +
 drivers/gpu/drm/drm_aux-dev.c        | 390 +++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_dp_helper.c      |  71 +++++++
 drivers/gpu/drm/i915/intel_dp.c      |   1 +
 include/drm/drm_dp_helper.h          |   7 +
 include/uapi/linux/Kbuild            |   1 +
 include/uapi/linux/drm_aux-dev.h     |  45 ++++
 9 files changed, 521 insertions(+)
 create mode 100644 drivers/gpu/drm/drm_aux-dev.c
 create mode 100644 include/uapi/linux/drm_aux-dev.h

-- 
2.4.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-09-17 14:42 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14 23:12 [PATCH 0/3] RFC: Add a drm_aux-dev module Rafael Antognolli
2015-09-14 23:12 ` [PATCH 1/3] drm/dp: Keep a list of drm_dp_aux helper Rafael Antognolli
2015-09-15  7:46   ` Ville Syrjälä
2015-09-15 16:27     ` Rafael Antognolli
2015-09-15 16:57       ` Ville Syrjälä
2015-09-16 20:06         ` Daniel Vetter
2015-09-14 23:12 ` [PATCH 2/3] drm/dp: Store the drm_connector device pointer on the helper Rafael Antognolli
2015-09-14 23:12 ` [PATCH 3/3] drm/dp: Add a drm_aux-dev module for reading/writing dpcd registers Rafael Antognolli
2015-09-15  7:35 ` [PATCH 0/3] RFC: Add a drm_aux-dev module Ville Syrjälä
2015-09-15 16:34   ` Rafael Antognolli
2015-09-15 16:41     ` Ville Syrjälä
2015-09-15 16:46       ` Ville Syrjälä
2015-09-15 17:03         ` Rafael Antognolli
2015-09-16 20:09           ` Daniel Vetter
2015-09-16 20:47             ` Ville Syrjälä
2015-09-16 20:51               ` Rafael Antognolli
2015-09-17  7:01               ` Jani Nikula
2015-09-17 14:42                 ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.