Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aeb745e9 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'topic/drm-misc-2015-11-26' of git://anongit.freedesktop.org/drm-intel into drm-next

Here's the first drm-misc pull, with really mostly misc stuff all over.
Somewhat invasive is only Ville's change to mark the arg struct for
fb_create const - that might conflict with a new driver pull. So better to
get in fast.

* tag 'topic/drm-misc-2015-11-26' of git://anongit.freedesktop.org/drm-intel:
  drm/mm: use list_next_entry
  drm/i915: fix potential dangling else problems in for_each_ macros
  drm: fix potential dangling else problems in for_each_ macros
  drm/sysfs: Send out uevent when connector->force changes
  drm/atomic: Small documentation fix.
  drm/mm: rewrite drm_mm_for_each_hole
  drm/sysfs: Grab lock for edid/modes_show
  drm: Print the src/dst/clip rectangles in error in drm_plane_helper
  drm: Add "prefix" parameter to drm_rect_debug_print()
  drm: Keep coordinates in the typical x, y, w, h order instead of x, y, h, w
  drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()
  drm: modes: replace simple_strtoul by kstrtouint
  drm: Describe the Rotation property bits.
  drm: Remove unused fbdev_list members
  GPU-DRM: Delete unnecessary checks before drm_property_unreference_blob()
  drm/dp: add eDP DPCD backlight control bit definitions
  drm/tegra: Remove local fbdev emulation Kconfig option
  drm/imx: Remove local fbdev emulation Kconfig option
  drm/gem: Update/Polish docs
  drm: Update GEM refcounting docs
parents 31ade3b8 87069f44
Loading
Loading
Loading
Loading
+12 −36
Original line number Diff line number Diff line
@@ -615,18 +615,6 @@ char *date;</synopsis>
          <function>drm_gem_object_init</function>. Storage for private GEM
          objects must be managed by drivers.
        </para>
        <para>
          Drivers that do not need to extend GEM objects with private information
          can call the <function>drm_gem_object_alloc</function> function to
          allocate and initialize a struct <structname>drm_gem_object</structname>
          instance. The GEM core will call the optional driver
          <methodname>gem_init_object</methodname> operation after initializing
          the GEM object with <function>drm_gem_object_init</function>.
          <synopsis>int (*gem_init_object) (struct drm_gem_object *obj);</synopsis>
        </para>
        <para>
          No alloc-and-init function exists for private GEM objects.
        </para>
      </sect3>
      <sect3>
        <title>GEM Objects Lifetime</title>
@@ -635,10 +623,10 @@ char *date;</synopsis>
          acquired and release by <function>calling drm_gem_object_reference</function>
          and <function>drm_gem_object_unreference</function> respectively. The
          caller must hold the <structname>drm_device</structname>
          <structfield>struct_mutex</structfield> lock. As a convenience, GEM
          provides the <function>drm_gem_object_reference_unlocked</function> and
          <function>drm_gem_object_unreference_unlocked</function> functions that
          can be called without holding the lock.
	  <structfield>struct_mutex</structfield> lock when calling
	  <function>drm_gem_object_reference</function>. As a convenience, GEM
	  provides <function>drm_gem_object_unreference_unlocked</function>
	  functions that can be called without holding the lock.
        </para>
        <para>
          When the last reference to a GEM object is released the GEM core calls
@@ -649,15 +637,9 @@ char *date;</synopsis>
        </para>
        <para>
          <synopsis>void (*gem_free_object) (struct drm_gem_object *obj);</synopsis>
          Drivers are responsible for freeing all GEM object resources, including
          the resources created by the GEM core. If an mmap offset has been
          created for the object (in which case
          <structname>drm_gem_object</structname>::<structfield>map_list</structfield>::<structfield>map</structfield>
          is not NULL) it must be freed by a call to
          <function>drm_gem_free_mmap_offset</function>. The shmfs backing store
          must be released by calling <function>drm_gem_object_release</function>
          (that function can safely be called if no shmfs backing store has been
          created).
          Drivers are responsible for freeing all GEM object resources. This includes
          the resources created by the GEM core, which need to be released with
          <function>drm_gem_object_release</function>.
        </para>
      </sect3>
      <sect3>
@@ -740,17 +722,10 @@ char *date;</synopsis>
          DRM identifies the GEM object to be mapped by a fake offset passed
          through the mmap offset argument. Prior to being mapped, a GEM object
          must thus be associated with a fake offset. To do so, drivers must call
          <function>drm_gem_create_mmap_offset</function> on the object. The
          function allocates a fake offset range from a pool and stores the
          offset divided by PAGE_SIZE in
          <literal>obj-&gt;map_list.hash.key</literal>. Care must be taken not to
          call <function>drm_gem_create_mmap_offset</function> if a fake offset
          has already been allocated for the object. This can be tested by
          <literal>obj-&gt;map_list.map</literal> being non-NULL.
          <function>drm_gem_create_mmap_offset</function> on the object.
        </para>
        <para>
          Once allocated, the fake offset value
          (<literal>obj-&gt;map_list.hash.key &lt;&lt; PAGE_SHIFT</literal>)
          must be passed to the application in a driver-specific way and can then
          be used as the mmap offset argument.
        </para>
@@ -836,10 +811,11 @@ char *date;</synopsis>
          abstracted from the client in libdrm.
        </para>
      </sect3>
      <sect3>
    </sect2>
    <sect2>
      <title>GEM Function Reference</title>
!Edrivers/gpu/drm/drm_gem.c
      </sect3>
!Iinclude/drm/drm_gem.h
    </sect2>
    <sect2>
      <title>VMA Offset Manager</title>
+2 −2
Original line number Diff line number Diff line
@@ -481,7 +481,7 @@ static const struct drm_framebuffer_funcs amdgpu_fb_funcs = {
int
amdgpu_framebuffer_init(struct drm_device *dev,
			struct amdgpu_framebuffer *rfb,
			struct drm_mode_fb_cmd2 *mode_cmd,
			const struct drm_mode_fb_cmd2 *mode_cmd,
			struct drm_gem_object *obj)
{
	int ret;
@@ -498,7 +498,7 @@ amdgpu_framebuffer_init(struct drm_device *dev,
static struct drm_framebuffer *
amdgpu_user_framebuffer_create(struct drm_device *dev,
			       struct drm_file *file_priv,
			       struct drm_mode_fb_cmd2 *mode_cmd)
			       const struct drm_mode_fb_cmd2 *mode_cmd)
{
	struct drm_gem_object *obj;
	struct amdgpu_framebuffer *amdgpu_fb;
+0 −1
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@
struct amdgpu_fbdev {
	struct drm_fb_helper helper;
	struct amdgpu_framebuffer rfb;
	struct list_head fbdev_list;
	struct amdgpu_device *adev;
};

+1 −1
Original line number Diff line number Diff line
@@ -551,7 +551,7 @@ int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,

int amdgpu_framebuffer_init(struct drm_device *dev,
			     struct amdgpu_framebuffer *rfb,
			     struct drm_mode_fb_cmd2 *mode_cmd,
			     const struct drm_mode_fb_cmd2 *mode_cmd,
			     struct drm_gem_object *obj);

int amdgpufb_remove(struct drm_device *dev, struct drm_framebuffer *fb);
+2 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ static const struct drm_framebuffer_funcs armada_fb_funcs = {
};

struct armada_framebuffer *armada_framebuffer_create(struct drm_device *dev,
	struct drm_mode_fb_cmd2 *mode, struct armada_gem_object *obj)
	const struct drm_mode_fb_cmd2 *mode, struct armada_gem_object *obj)
{
	struct armada_framebuffer *dfb;
	uint8_t format, config;
@@ -101,7 +101,7 @@ struct armada_framebuffer *armada_framebuffer_create(struct drm_device *dev,
}

static struct drm_framebuffer *armada_fb_create(struct drm_device *dev,
	struct drm_file *dfile, struct drm_mode_fb_cmd2 *mode)
	struct drm_file *dfile, const struct drm_mode_fb_cmd2 *mode)
{
	struct armada_gem_object *obj;
	struct armada_framebuffer *dfb;
Loading