Skip to contentSkip to conversation

staging: vboxvideo: Stop accessing crtc_state->active

PATCH New Hans de Goede 1 participant 6 messages Oct 18, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 staging: vboxvideo: Stop accessing crtc_state->active

Atomic modesetting drivers should never check crtc_state->active directly, instead check crtc_state->enable.

---
 drivers/staging/vboxvideo/vbox_mode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vboxvideo/vbox_mode.c +1 -1
index 6acc965247ff..90486cf573cd 100644
@@ -84,7 +84,7 @@ static void vbox_do_modeset(struct drm_crtc *crtc)
 	}
 
 	flags = VBVA_SCREEN_F_ACTIVE;
-	flags |= (fb && crtc->state->active) ? 0 : VBVA_SCREEN_F_BLANK;
+	flags |= (fb && crtc->state->enable) ? 0 : VBVA_SCREEN_F_BLANK;
 	flags |= vbox_crtc->disconnected ? VBVA_SCREEN_F_DISABLED : 0;
 	hgsmi_process_display_info(vbox->guest_pool, vbox_crtc->crtc_id,
 				   x_offset, y_offset,
Signature · 6 lines
2.19.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/6 staging: vboxvideo: Keep old mode when disable crtc

On DPMS off we get a call to vbx_crtc_atomic_disable, followed by a call to vbox_primary_atomic_update, at which point crtc_state->enable is 0 and crtc_state->mode has been zero-ed. On a 0 width/height vbox_do_modeset() falls back to 640x480, so this causes the guest Window (its "monitor") to resize to 640x480 (and become black).

This commit makes us not look at crtc_state->mode when crtc_state->enable is not set, so that we keep the old mode and just make the window go black.

---
 drivers/staging/vboxvideo/vbox_mode.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/staging/vboxvideo/vbox_mode.c +7 -5
index 90486cf573cd..901a2a4b0848 100644
@@ -190,7 +190,6 @@ static bool vbox_set_up_input_mapping(struct vbox_private *vbox)
 
 static void vbox_crtc_set_base_and_mode(struct drm_crtc *crtc,
 					struct drm_framebuffer *fb,
-					struct drm_display_mode *mode,
 					int x, int y)
 {
 	struct vbox_bo *bo = gem_to_vbox_bo(to_vbox_framebuffer(fb)->obj);
@@ -200,8 +199,11 @@ static void vbox_crtc_set_base_and_mode(struct drm_crtc *crtc,
 
 	mutex_lock(&vbox->hw_mutex);
 
-	vbox_crtc->width = mode->hdisplay;
-	vbox_crtc->height = mode->vdisplay;
+	if (crtc->state->enable) {
+		vbox_crtc->width = crtc->state->mode.hdisplay;
+		vbox_crtc->height = crtc->state->mode.vdisplay;
+	}
+
 	vbox_crtc->x = x;
 	vbox_crtc->y = y;
 	vbox_crtc->fb_offset = vbox_bo_gpu_offset(bo);
@@ -301,7 +303,7 @@ static void vbox_primary_atomic_update(struct drm_plane *plane,
 	struct drm_crtc *crtc = plane->state->crtc;
 	struct drm_framebuffer *fb = plane->state->fb;
 
-	vbox_crtc_set_base_and_mode(crtc, fb, &crtc->state->mode,
+	vbox_crtc_set_base_and_mode(crtc, fb,
 				    plane->state->src_x >> 16,
 				    plane->state->src_y >> 16);
 }
@@ -312,7 +314,7 @@ static void vbox_primary_atomic_disable(struct drm_plane *plane,
 	struct drm_crtc *crtc = old_state->crtc;
 
 	/* vbox_do_modeset checks plane->state->fb and will disable if NULL */
-	vbox_crtc_set_base_and_mode(crtc, old_state->fb, &crtc->state->mode,
+	vbox_crtc_set_base_and_mode(crtc, old_state->fb,
 				    old_state->src_x >> 16,
 				    old_state->src_y >> 16);
 }
Signature · 1 line
2.19.0
#2 lore raw

PATCH 3/6 staging: vboxvideo: Drop duplicate vbox_err.h file

In reply to Hans de Goede

Switch to the more complete vbox_err.h file from include/linux which got added with the merging of the vboxguest driver.

---
 drivers/staging/vboxvideo/hgsmi_base.c  |  4 +-
 drivers/staging/vboxvideo/modesetting.c |  4 +-
 drivers/staging/vboxvideo/vbox_err.h    | 50 -------------------------
 drivers/staging/vboxvideo/vbox_main.c   |  3 +-
 drivers/staging/vboxvideo/vbva_base.c   |  4 +-
 5 files changed, 8 insertions(+), 57 deletions(-)
 delete mode 100644 drivers/staging/vboxvideo/vbox_err.h
drivers/staging/vboxvideo/hgsmi_base.c +2 -2
index 15ff5f42e2cd..89a7cc989d5b 100644
@@ -20,8 +20,8 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <linux/vbox_err.h>
 #include "vbox_drv.h"
-#include "vbox_err.h"
 #include "vboxvideo_guest.h"
 #include "vboxvideo_vbe.h"
 #include "hgsmi_channels.h"
@@ -70,7 +70,7 @@ int hgsmi_send_caps_info(struct gen_pool *ctx, u32 caps)
 
 	hgsmi_buffer_submit(ctx, p);
 
-	WARN_ON_ONCE(RT_FAILURE(p->rc));
+	WARN_ON_ONCE(p->rc < 0);
 
 	hgsmi_buffer_free(ctx, p);
 
drivers/staging/vboxvideo/modesetting.c +2 -2
index 7616b8aab23a..e49c2c779726 100644
@@ -20,8 +20,8 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <linux/vbox_err.h>
 #include "vbox_drv.h"
-#include "vbox_err.h"
 #include "vboxvideo_guest.h"
 #include "vboxvideo_vbe.h"
 #include "hgsmi_channels.h"
@@ -130,7 +130,7 @@ int hgsmi_get_mode_hints(struct gen_pool *ctx, unsigned int screens,
 
 	hgsmi_buffer_submit(ctx, p);
 
-	if (RT_FAILURE(p->rc)) {
+	if (p->rc < 0) {
 		hgsmi_buffer_free(ctx, p);
 		return -EIO;
 	}
drivers/staging/vboxvideo/vbox_err.h deleted +0 -50

50 lines not on this page · raw message

drivers/staging/vboxvideo/vbox_main.c +2 -1
index 7466c1103ff6..053dbad0ec23 100644
@@ -27,11 +27,12 @@
  *          Michael Thayer <[email protected],
  *          Hans de Goede <[email protected]>
  */
+
+#include <linux/vbox_err.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_crtc_helper.h>
 
 #include "vbox_drv.h"
-#include "vbox_err.h"
 #include "vboxvideo_guest.h"
 #include "vboxvideo_vbe.h"
 
drivers/staging/vboxvideo/vbva_base.c +2 -2
index c10c782f94e1..42b02e1194f5 100644
@@ -20,8 +20,8 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <linux/vbox_err.h>
 #include "vbox_drv.h"
-#include "vbox_err.h"
 #include "vboxvideo_guest.h"
 #include "hgsmi_channels.h"
 
@@ -144,7 +144,7 @@ static bool vbva_inform_host(struct vbva_buf_ctx *vbva_ctx,
 	hgsmi_buffer_submit(ctx, p);
 
 	if (enable)
-		ret = RT_SUCCESS(p->base.result);
+		ret = p->base.result >= 0;
 	else
 		ret = true;
 
Signature · 6 lines
2.19.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

PATCH 4/6 staging: vboxvideo: Cleanup the comments

In reply to Hans de Goede

Some comments where still using docbook style comments, move these either over to kerneldoc, or just make them regular comments.

Also remove a bunch of obsolete comments.

---
 drivers/staging/vboxvideo/hgsmi_base.c      |  72 +++++-------
 drivers/staging/vboxvideo/hgsmi_ch_setup.h  |  17 +--
 drivers/staging/vboxvideo/modesetting.c     |  44 ++++----
 drivers/staging/vboxvideo/vbox_drv.h        |  10 +-
 drivers/staging/vboxvideo/vbox_irq.c        |   6 +-
 drivers/staging/vboxvideo/vbox_main.c       |   8 +-
 drivers/staging/vboxvideo/vbox_mode.c       |  12 +-
 drivers/staging/vboxvideo/vbox_ttm.c        |   8 +-
 drivers/staging/vboxvideo/vboxvideo.h       | 119 ++++++++------------
 drivers/staging/vboxvideo/vboxvideo_guest.h |  27 +----
 drivers/staging/vboxvideo/vboxvideo_vbe.h   |  11 --
 11 files changed, 117 insertions(+), 217 deletions(-)
drivers/staging/vboxvideo/hgsmi_base.c +26 -46
index 89a7cc989d5b..3e1c578123f6 100644
@@ -29,9 +29,9 @@
 
 /**
  * Inform the host of the location of the host flags in VRAM via an HGSMI cmd.
- * @param    ctx          the context of the guest heap to use.
- * @param    location     the offset chosen for the flags within guest VRAM.
- * @returns 0 on success, -errno on failure
+ * Return: 0 or negative errno value.
+ * @ctx:        The context of the guest heap to use.
+ * @location:   The offset chosen for the flags within guest VRAM.
  */
 int hgsmi_report_flags_location(struct gen_pool *ctx, u32 location)
 {
@@ -53,9 +53,9 @@ int hgsmi_report_flags_location(struct gen_pool *ctx, u32 location)
 
 /**
  * Notify the host of HGSMI-related guest capabilities via an HGSMI command.
- * @param    ctx                 the context of the guest heap to use.
- * @param    caps                the capabilities to report, see vbva_caps.
- * @returns 0 on success, -errno on failure
+ * Return: 0 or negative errno value.
+ * @ctx:        The context of the guest heap to use.
+ * @caps:       The capabilities to report, see vbva_caps.
  */
 int hgsmi_send_caps_info(struct gen_pool *ctx, u32 caps)
 {
@@ -91,11 +91,10 @@ int hgsmi_test_query_conf(struct gen_pool *ctx)
 
 /**
  * Query the host for an HGSMI configuration parameter via an HGSMI command.
- * @param  ctx        the context containing the heap used
- * @param  index      the index of the parameter to query,
- *                    @see vbva_conf32::index
- * @param  value_ret  where to store the value of the parameter on success
- * @returns 0 on success, -errno on failure
+ * Return: 0 or negative errno value.
+ * @ctx:        The context containing the heap used.
+ * @index:      The index of the parameter to query.
+ * @value_ret:  Where to store the value of the parameter on success.
  */
 int hgsmi_query_conf(struct gen_pool *ctx, u32 index, u32 *value_ret)
 {
@@ -120,16 +119,15 @@ int hgsmi_query_conf(struct gen_pool *ctx, u32 index, u32 *value_ret)
 
 /**
  * Pass the host a new mouse pointer shape via an HGSMI command.
- *
- * @param  ctx      the context containing the heap to be used
- * @param  flags    cursor flags, @see VMMDevReqMousePointer::flags
- * @param  hot_x    horizontal position of the hot spot
- * @param  hot_y    vertical position of the hot spot
- * @param  width    width in pixels of the cursor
- * @param  height   height in pixels of the cursor
- * @param  pixels   pixel data, @see VMMDevReqMousePointer for the format
- * @param  len      size in bytes of the pixel data
- * @returns 0 on success, -errno on failure
+ * Return: 0 or negative errno value.
+ * @ctx:        The context containing the heap to be used.
+ * @flags:      Cursor flags.
+ * @hot_x:      Horizontal position of the hot spot.
+ * @hot_y:      Vertical position of the hot spot.
+ * @width:      Width in pixels of the cursor.
+ * @height:     Height in pixels of the cursor.
+ * @pixels:     Pixel data, @see VMMDevReqMousePointer for the format.
+ * @len:        Size in bytes of the pixel data.
  */
 int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags,
 			       u32 hot_x, u32 hot_y, u32 width, u32 height,
@@ -195,13 +193,13 @@ int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags,
  * Report the guest cursor position.  The host may wish to use this information
  * to re-position its own cursor (though this is currently unlikely).  The
  * current host cursor position is returned.
- * @param  ctx              The context containing the heap used.
- * @param  report_position  Are we reporting a position?
- * @param  x                Guest cursor X position.
- * @param  y                Guest cursor Y position.
- * @param  x_host           Host cursor X position is stored here.  Optional.
- * @param  y_host           Host cursor Y position is stored here.  Optional.
- * @returns 0 on success, -errno on failure
+ * Return: 0 or negative errno value.
+ * @ctx:              The context containing the heap used.
+ * @report_position:  Are we reporting a position?
+ * @x:                Guest cursor X position.
+ * @y:                Guest cursor Y position.
+ * @x_host:           Host cursor X position is stored here.  Optional.
+ * @y_host:           Host cursor Y position is stored here.  Optional.
  */
 int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position,
 			  u32 x, u32 y, u32 *x_host, u32 *y_host)
@@ -226,21 +224,3 @@ int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position,
 
 	return 0;
 }
-
-/**
- * @todo Mouse pointer position to be read from VMMDev memory, address of the
- * memory region can be queried from VMMDev via an IOCTL. This VMMDev memory
- * region will contain host information which is needed by the guest.
- *
- * Reading will not cause a switch to the host.
- *
- * Have to take into account:
- *  * synchronization: host must write to the memory only from EMT,
- *    large structures must be read under flag, which tells the host
- *    that the guest is currently reading the memory (OWNER flag?).
- *  * guest writes: may be allocate a page for the host info and make
- *    the page readonly for the guest.
- *  * the information should be available only for additions drivers.
- *  * VMMDev additions driver will inform the host which version of the info
- *    it expects, host must support all versions.
- */
drivers/staging/vboxvideo/hgsmi_ch_setup.h +1 -16
index 8e6d9e11a69c..3c3f82eb7909 100644
@@ -36,29 +36,14 @@ struct hgsmi_buffer_location {
 } __packed;
 
 /* HGSMI setup and configuration data structures. */
-/* host->guest commands pending, should be accessed under FIFO lock only */
+
 #define HGSMIHOSTFLAGS_COMMANDS_PENDING    0x01u
-/* IRQ is fired, should be accessed under VGAState::lock only  */
 #define HGSMIHOSTFLAGS_IRQ                 0x02u
-/* vsync interrupt flag, should be accessed under VGAState::lock only */
 #define HGSMIHOSTFLAGS_VSYNC               0x10u
-/** monitor hotplug flag, should be accessed under VGAState::lock only */
 #define HGSMIHOSTFLAGS_HOTPLUG             0x20u
-/**
- * Cursor capability state change flag, should be accessed under
- * VGAState::lock only. @see vbva_conf32.
- */
 #define HGSMIHOSTFLAGS_CURSOR_CAPABILITIES 0x40u
 
 struct hgsmi_host_flags {
-	/*
-	 * Host flags can be accessed and modified in multiple threads
-	 * concurrently, e.g. CrOpenGL HGCM and GUI threads when completing
-	 * HGSMI 3D and Video Accel respectively, EMT thread when dealing with
-	 * HGSMI command processing, etc.
-	 * Besides settings/cleaning flags atomically, some flags have their
-	 * own special sync restrictions, see comments for flags above.
-	 */
 	u32 host_flags;
 	u32 reserved[3];
 } __packed;
drivers/staging/vboxvideo/modesetting.c +22 -22

62 lines not on this page · raw message

drivers/staging/vboxvideo/vbox_drv.h +5 -5
index 73395a7536c5..361cd1ab7a9a 100644
@@ -89,11 +89,11 @@ struct vbox_private {
 	struct vbva_buf_ctx *vbva_info;
 	bool any_pitch;
 	u32 num_crtcs;
-	/** Amount of available VRAM, including space used for buffers. */
+	/* Amount of available VRAM, including space used for buffers. */
 	u32 full_vram_size;
-	/** Amount of available VRAM, not including space used for buffers. */
+	/* Amount of available VRAM, not including space used for buffers. */
 	u32 available_vram_size;
-	/** Array of structures for receiving mode hints. */
+	/* Array of structures for receiving mode hints. */
 	struct vbva_modehint *last_mode_hints;
 
 	int fb_mtrr;
@@ -105,7 +105,7 @@ struct vbox_private {
 	} ttm;
 
 	struct mutex hw_mutex; /* protects modeset and accel/vbva accesses */
-	/**
+	/*
 	 * We decide whether or not user-space supports display hot-plug
 	 * depending on whether they react to a hot-plug event after the initial
 	 * mode query.
@@ -114,7 +114,7 @@ struct vbox_private {
 	struct work_struct hotplug_work;
 	u32 input_mapping_width;
 	u32 input_mapping_height;
-	/**
+	/*
 	 * Is user-space using an X.Org-style layout of one large frame-buffer
 	 * encompassing all screen ones or is the fbdev console active?
 	 */
drivers/staging/vboxvideo/vbox_irq.c +2 -4
index 09f858ec1369..acc02c4d0054 100644
@@ -72,7 +72,7 @@ irqreturn_t vbox_irq_handler(int irq, void *arg)
 	return IRQ_HANDLED;
 }
 
-/**
+/*
  * Check that the position hints provided by the host are suitable for GNOME
  * shell (i.e. all screens disjoint and hints for all enabled screens) and if
  * not replace them with default ones.  Providing valid hints improves the
@@ -118,9 +118,7 @@ static void validate_or_set_position_hints(struct vbox_private *vbox)
 		}
 }
 
-/**
- * Query the host for the most recent video mode hints.
- */
+/* Query the host for the most recent video mode hints. */
 static void vbox_update_mode_hints(struct vbox_private *vbox)
 {
 	struct drm_device *dev = &vbox->ddev;
drivers/staging/vboxvideo/vbox_main.c +2 -6
index 053dbad0ec23..4ed39aaf8a0d 100644
@@ -92,7 +92,7 @@ void vbox_report_caps(struct vbox_private *vbox)
 	hgsmi_send_caps_info(vbox->guest_pool, caps);
 }
 
-/**
+/*
  * Send information about dirty rectangles to VBVA.  If necessary we enable
  * VBVA first, as this is normally disabled after a change of master in case
  * the new master does not send dirty rectangle information (is this even
@@ -214,7 +214,7 @@ static void vbox_accel_fini(struct vbox_private *vbox)
 	pci_iounmap(vbox->ddev.pdev, vbox->vbva_buffers);
 }
 
-/** Do we support the 4.3 plus mode hint reporting interface? */
+/* Do we support the 4.3 plus mode hint reporting interface? */
 static bool have_hgsmi_mode_hints(struct vbox_private *vbox)
 {
 	u32 have_hints, have_cursor;
@@ -245,10 +245,6 @@ bool vbox_check_supported(u16 id)
 	return dispi_id == id;
 }
 
-/**
- * Set up our heaps and data exchange buffers in VRAM before handing the rest
- * to the memory manager.
- */
 int vbox_hw_init(struct vbox_private *vbox)
 {
 	int ret = -ENOMEM;
drivers/staging/vboxvideo/vbox_mode.c +6 -6
index 901a2a4b0848..beedcb357bfe 100644
@@ -41,7 +41,7 @@
 #include "vboxvideo.h"
 #include "hgsmi_channels.h"
 
-/**
+/*
  * Set a graphics mode.  Poke any required values into registers, do an HGSMI
  * mode set and tell the host we support advanced graphics functions.
  */
@@ -380,7 +380,7 @@ static int vbox_cursor_atomic_check(struct drm_plane *plane,
 	return 0;
 }
 
-/**
+/*
  * Copy the ARGB image and generate the mask, which is needed in case the host
  * does not support ARGB cursors.  The mask is a 1BPP bitmap with the bit set
  * if the corresponding alpha value in the ARGB image is greater than 0xF0.
@@ -674,11 +674,11 @@ static struct drm_encoder *vbox_encoder_init(struct drm_device *dev,
 	return &vbox_encoder->base;
 }
 
-/**
+/*
  * Generate EDID data with a mode-unique serial number for the virtual
- *  monitor to try to persuade Unity that different modes correspond to
- *  different monitors and it should not try to force the same resolution on
- *  them.
+ * monitor to try to persuade Unity that different modes correspond to
+ * different monitors and it should not try to force the same resolution on
+ * them.
  */
 static void vbox_set_edid(struct drm_connector *connector, int width,
 			  int height)
drivers/staging/vboxvideo/vbox_ttm.c +2 -6
index 5ecfa7629173..9f4104dfbc73 100644
@@ -45,9 +45,7 @@ static void vbox_ttm_mem_global_release(struct drm_global_reference *ref)
 	ttm_mem_global_release(ref->object);
 }
 
-/**
- * Adds the vbox memory manager object/structures to the global memory manager.
- */
+/* Add the vbox memory manager object/structures to the global memory manager */
 static int vbox_ttm_global_init(struct vbox_private *vbox)
 {
 	struct drm_global_reference *global_ref;
@@ -81,9 +79,7 @@ static int vbox_ttm_global_init(struct vbox_private *vbox)
 	return 0;
 }
 
-/**
- * Removes the vbox memory manager object from the global memory manager.
- */
+/* Remove the vbox memory manager object from the global memory manager */
 static void vbox_ttm_global_release(struct vbox_private *vbox)
 {
 	drm_global_item_unref(&vbox->ttm.bo_global_ref.ref);
drivers/staging/vboxvideo/vboxvideo.h +45 -74

289 lines not on this page · raw message

drivers/staging/vboxvideo/vboxvideo_guest.h +6 -21
index d09da841711a..e2273d19fffa 100644
@@ -26,30 +26,26 @@
 #include <linux/genalloc.h>
 #include "vboxvideo.h"
 
-/**
+/*
  * Structure grouping the context needed for sending graphics acceleration
  * information to the host via VBVA.  Each screen has its own VBVA buffer.
  */
 struct vbva_buf_ctx {
-	/** Offset of the buffer in the VRAM section for the screen */
+	/* Offset of the buffer in the VRAM section for the screen */
 	u32 buffer_offset;
-	/** Length of the buffer in bytes */
+	/* Length of the buffer in bytes */
 	u32 buffer_length;
-	/** Set if we wrote to the buffer faster than the host could read it */
+	/* Set if we wrote to the buffer faster than the host could read it */
 	bool buffer_overflow;
-	/** VBVA record that we are currently preparing for the host, or NULL */
+	/* VBVA record that we are currently preparing for the host, or NULL */
 	struct vbva_record *record;
-	/**
+	/*
 	 * Pointer to the VBVA buffer mapped into the current address space.
 	 * Will be NULL if VBVA is not enabled.
 	 */
 	struct vbva_buffer *vbva;
 };
 
-/**
- * @name Base HGSMI APIs
- * @{
- */
 int hgsmi_report_flags_location(struct gen_pool *ctx, u32 location);
 int hgsmi_send_caps_info(struct gen_pool *ctx, u32 caps);
 int hgsmi_test_query_conf(struct gen_pool *ctx);
@@ -59,12 +55,7 @@ int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags,
 			       u8 *pixels, u32 len);
 int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position,
 			  u32 x, u32 y, u32 *x_host, u32 *y_host);
-/** @}  */
 
-/**
- * @name VBVA APIs
- * @{
- */
 bool vbva_enable(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx,
 		 struct vbva_buffer *vbva, s32 screen);
 void vbva_disable(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx,
@@ -76,12 +67,7 @@ bool vbva_write(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx,
 		const void *p, u32 len);
 void vbva_setup_buffer_context(struct vbva_buf_ctx *vbva_ctx,
 			       u32 buffer_offset, u32 buffer_length);
-/** @}  */
 
-/**
- * @name Modesetting APIs
- * @{
- */
 void hgsmi_process_display_info(struct gen_pool *ctx, u32 display,
 				s32 origin_x, s32 origin_y, u32 start_offset,
 				u32 pitch, u32 width, u32 height,
@@ -90,6 +76,5 @@ int hgsmi_update_input_mapping(struct gen_pool *ctx, s32 origin_x, s32 origin_y,
 			       u32 width, u32 height);
 int hgsmi_get_mode_hints(struct gen_pool *ctx, unsigned int screens,
 			 struct vbva_modehint *hints);
-/** @}  */
 
 #endif
drivers/staging/vboxvideo/vboxvideo_vbe.h +0 -11
index f842f4d9c80a..5bcd98aa9b77 100644
@@ -25,11 +25,6 @@
 
 /* GUEST <-> HOST Communication API */
 
-/**
- * @todo FIXME: Either dynamicly ask host for this or put somewhere high in
- *              physical memory like 0xE0000000.
- */
-
 #define VBE_DISPI_BANK_ADDRESS          0xA0000
 #define VBE_DISPI_BANK_SIZE_KB          64
 
@@ -71,12 +66,6 @@
 #define VBE_DISPI_ENABLED               0x01
 #define VBE_DISPI_GETCAPS               0x02
 #define VBE_DISPI_8BIT_DAC              0x20
-/**
- * @note this definition is a BOCHS legacy, used only in the video BIOS
- * code and ignored by the emulated hardware.
- */
-#define VBE_DISPI_LFB_ENABLED           0x40
-#define VBE_DISPI_NOCLEARMEM            0x80
 
 #define VGA_PORT_HGSMI_HOST             0x3b0
 #define VGA_PORT_HGSMI_GUEST            0x3d0
Signature · 6 lines
2.19.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

PATCH 5/6 staging: vboxvideo: Change licence headers over to SPDX

In reply to Hans de Goede

All the files contain a MIT license header, replace this with:
SPDX-License-Identifier: MIT

---
 drivers/staging/vboxvideo/hgsmi_base.c      | 23 ++------------------
 drivers/staging/vboxvideo/hgsmi_ch_setup.h  | 23 ++------------------
 drivers/staging/vboxvideo/hgsmi_channels.h  | 23 ++------------------
 drivers/staging/vboxvideo/hgsmi_defs.h      | 23 ++------------------
 drivers/staging/vboxvideo/modesetting.c     | 23 ++------------------
 drivers/staging/vboxvideo/vbox_drv.c        | 22 +------------------
 drivers/staging/vboxvideo/vbox_drv.h        | 22 +------------------
 drivers/staging/vboxvideo/vbox_fb.c         | 22 +------------------
 drivers/staging/vboxvideo/vbox_hgsmi.c      | 22 +------------------
 drivers/staging/vboxvideo/vbox_irq.c        | 20 +----------------
 drivers/staging/vboxvideo/vbox_main.c       | 22 +------------------
 drivers/staging/vboxvideo/vbox_mode.c       | 24 +--------------------
 drivers/staging/vboxvideo/vbox_prime.c      | 20 +----------------
 drivers/staging/vboxvideo/vbox_ttm.c        | 23 +-------------------
 drivers/staging/vboxvideo/vboxvideo.h       | 24 ++-------------------
 drivers/staging/vboxvideo/vboxvideo_guest.h | 23 ++------------------
 drivers/staging/vboxvideo/vboxvideo_vbe.h   | 23 ++------------------
 drivers/staging/vboxvideo/vbva_base.c       | 23 ++------------------
 18 files changed, 27 insertions(+), 378 deletions(-)
drivers/staging/vboxvideo/hgsmi_base.c +2 -21
index 3e1c578123f6..361d3193258e 100644
@@ -1,24 +1,5 @@
-/*
- * Copyright (C) 2006-2017 Oracle Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
+// SPDX-License-Identifier: MIT
+/* Copyright (C) 2006-2017 Oracle Corporation */
 
 #include <linux/vbox_err.h>
 #include "vbox_drv.h"
drivers/staging/vboxvideo/hgsmi_ch_setup.h +2 -21
index 3c3f82eb7909..4e93418d6a13 100644
@@ -1,24 +1,5 @@
-/*
- * Copyright (C) 2006-2017 Oracle Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
+/* SPDX-License-Identifier: MIT */
+/* Copyright (C) 2006-2017 Oracle Corporation */
 
 #ifndef __HGSMI_CH_SETUP_H__
 #define __HGSMI_CH_SETUP_H__
drivers/staging/vboxvideo/hgsmi_channels.h +2 -21
index a2a34b2167b4..9b83f4ff3faf 100644
@@ -1,24 +1,5 @@
-/*
- * Copyright (C) 2006-2017 Oracle Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
+/* SPDX-License-Identifier: MIT */
+/* Copyright (C) 2006-2017 Oracle Corporation */
 
 #ifndef __HGSMI_CHANNELS_H__
 #define __HGSMI_CHANNELS_H__
drivers/staging/vboxvideo/hgsmi_defs.h +2 -21
index 5b21fb974d20..6c8df1cdb087 100644
@@ -1,24 +1,5 @@
-/*
- * Copyright (C) 2006-2017 Oracle Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
+/* SPDX-License-Identifier: MIT */
+/* Copyright (C) 2006-2017 Oracle Corporation */
 
 #ifndef __HGSMI_DEFS_H__
 #define __HGSMI_DEFS_H__
drivers/staging/vboxvideo/modesetting.c +2 -21
index be46bb70e919..7580b9002379 100644
@@ -1,24 +1,5 @@
-/*
- * Copyright (C) 2006-2017 Oracle Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
+// SPDX-License-Identifier: MIT
+/* Copyright (C) 2006-2017 Oracle Corporation */
 
 #include <linux/vbox_err.h>
 #include "vbox_drv.h"
drivers/staging/vboxvideo/vbox_drv.c +1 -21
index 257030460fb6..ef4db193317b 100644
@@ -1,28 +1,8 @@
+// SPDX-License-Identifier: MIT
 /*
  * Copyright (C) 2013-2017 Oracle Corporation
  * This file is based on ast_drv.c
  * Copyright 2012 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
  * Authors: Dave Airlie <[email protected]>
  *          Michael Thayer <[email protected],
  *          Hans de Goede <[email protected]>
drivers/staging/vboxvideo/vbox_drv.h +1 -21
index 361cd1ab7a9a..57e9f1f3ba65 100644
@@ -1,28 +1,8 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * Copyright (C) 2013-2017 Oracle Corporation
  * This file is based on ast_drv.h
  * Copyright 2012 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
  * Authors: Dave Airlie <[email protected]>
  *          Michael Thayer <[email protected],
  *          Hans de Goede <[email protected]>
drivers/staging/vboxvideo/vbox_fb.c +1 -21
index ee25f3a03934..8041d0c46a6b 100644
@@ -1,28 +1,8 @@
+// SPDX-License-Identifier: MIT
 /*
  * Copyright (C) 2013-2017 Oracle Corporation
  * This file is based on ast_fb.c
  * Copyright 2012 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
  * Authors: Dave Airlie <[email protected]>
  *          Michael Thayer <[email protected],
  */
drivers/staging/vboxvideo/vbox_hgsmi.c +1 -21
index 822fd31121cb..94b60654a012 100644
@@ -1,26 +1,6 @@
+// SPDX-License-Identifier: MIT
 /*
  * Copyright (C) 2017 Oracle Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
  * Authors: Hans de Goede <[email protected]>
  */
 
drivers/staging/vboxvideo/vbox_irq.c +1 -19
index acc02c4d0054..f3d9895c79d8 100644
@@ -1,26 +1,8 @@
+// SPDX-License-Identifier: MIT
 /*
  * Copyright (C) 2016-2017 Oracle Corporation
  * This file is based on qxl_irq.c
  * Copyright 2013 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
  * Authors: Dave Airlie
  *          Alon Levy
  *          Michael Thayer <[email protected],
drivers/staging/vboxvideo/vbox_main.c +1 -21
index 4ed39aaf8a0d..154afac28dda 100644
@@ -1,28 +1,8 @@
+// SPDX-License-Identifier: MIT
 /*
  * Copyright (C) 2013-2017 Oracle Corporation
  * This file is based on ast_main.c
  * Copyright 2012 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
  * Authors: Dave Airlie <[email protected]>,
  *          Michael Thayer <[email protected],
  *          Hans de Goede <[email protected]>
drivers/staging/vboxvideo/vbox_mode.c +1 -23
index beedcb357bfe..06e921844b1e 100644
@@ -1,32 +1,10 @@
+// SPDX-License-Identifier: MIT
 /*
  * Copyright (C) 2013-2017 Oracle Corporation
  * This file is based on ast_mode.c
  * Copyright 2012 Red Hat Inc.
  * Parts based on xf86-video-ast
  * Copyright (c) 2005 ASPEED Technology Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- */
-/*
  * Authors: Dave Airlie <[email protected]>
  *          Michael Thayer <[email protected],
  *          Hans de Goede <[email protected]>
drivers/staging/vboxvideo/vbox_prime.c +1 -19
index b7453e427a1d..d61985b0c6eb 100644
@@ -1,25 +1,7 @@
+// SPDX-License-Identifier: MIT
 /*
  * Copyright (C) 2017 Oracle Corporation
  * Copyright 2017 Canonical
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
  * Authors: Andreas Pokorny
  */
 
drivers/staging/vboxvideo/vbox_ttm.c +1 -22
index 9f4104dfbc73..74f2d271ddac 100644
@@ -1,29 +1,8 @@
+// SPDX-License-Identifier: MIT
 /*
  * Copyright (C) 2013-2017 Oracle Corporation
  * This file is based on ast_ttm.c
  * Copyright 2012 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- *
  * Authors: Dave Airlie <[email protected]>
  *          Michael Thayer <[email protected]>
  */
drivers/staging/vboxvideo/vboxvideo.h +2 -22
index 0b2e672574ea..0592004f71aa 100644
@@ -1,25 +1,5 @@
-/*
- * Copyright (C) 2006-2016 Oracle Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- */
+/* SPDX-License-Identifier: MIT */
+/* Copyright (C) 2006-2016 Oracle Corporation */
 
 #ifndef __VBOXVIDEO_H__
 #define __VBOXVIDEO_H__
drivers/staging/vboxvideo/vboxvideo_guest.h +2 -21
index e2273d19fffa..55fcee3a6470 100644
@@ -1,24 +1,5 @@
-/*
- * Copyright (C) 2006-2017 Oracle Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
+/* SPDX-License-Identifier: MIT */
+/* Copyright (C) 2006-2016 Oracle Corporation */
 
 #ifndef __VBOXVIDEO_GUEST_H__
 #define __VBOXVIDEO_GUEST_H__
drivers/staging/vboxvideo/vboxvideo_vbe.h +2 -21
index 5bcd98aa9b77..427235869297 100644
@@ -1,24 +1,5 @@
-/*
- * Copyright (C) 2006-2017 Oracle Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
+/* SPDX-License-Identifier: MIT */
+/* Copyright (C) 2006-2016 Oracle Corporation */
 
 #ifndef __VBOXVIDEO_VBE_H__
 #define __VBOXVIDEO_VBE_H__
drivers/staging/vboxvideo/vbva_base.c +2 -21
index 42b02e1194f5..36bc9824ec3f 100644
@@ -1,24 +1,5 @@
-/*
- * Copyright (C) 2006-2017 Oracle Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
+// SPDX-License-Identifier: MIT
+/* Copyright (C) 2006-2017 Oracle Corporation */
 
 #include <linux/vbox_err.h>
 #include "vbox_drv.h"
Signature · 6 lines
2.19.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#5 lore raw

PATCH 6/6 staging: vboxvideo: Stop disabling/enabling accel support on master set / drop

In reply to Hans de Goede

Userspace mode-setting (and thus also VESA) is not supported together with modesetting. KMS userspace apps not properly marking the framebuffer as dirty are also not supported.

So stop trying to accommodate this and simply enable accel once at driver init.

---
 drivers/staging/vboxvideo/vbox_drv.c  | 19 ---------
 drivers/staging/vboxvideo/vbox_drv.h  |  2 -
 drivers/staging/vboxvideo/vbox_main.c | 60 +++++++--------------------
 3 files changed, 16 insertions(+), 65 deletions(-)
drivers/staging/vboxvideo/vbox_drv.c +0 -19
index ef4db193317b..d7440b9e5eea 100644
@@ -207,21 +207,6 @@ static int vbox_master_set(struct drm_device *dev,
 	 */
 	vbox->initial_mode_queried = false;
 
-	mutex_lock(&vbox->hw_mutex);
-	/*
-	 * Disable VBVA when someone releases master in case the next person
-	 * tries tries to do VESA.
-	 */
-	/** @todo work out if anyone is likely to and whether it will work. */
-	/*
-	 * Update: we also disable it because if the new master does not do
-	 * dirty rectangle reporting (e.g. old versions of Plymouth) then at
-	 * least the first screen will still be updated. We enable it as soon
-	 * as we receive a dirty rectangle report.
-	 */
-	vbox_disable_accel(vbox);
-	mutex_unlock(&vbox->hw_mutex);
-
 	return 0;
 }
 
@@ -231,10 +216,6 @@ static void vbox_master_drop(struct drm_device *dev, struct drm_file *file_priv)
 
 	/* See vbox_master_set() */
 	vbox->initial_mode_queried = false;
-
-	mutex_lock(&vbox->hw_mutex);
-	vbox_disable_accel(vbox);
-	mutex_unlock(&vbox->hw_mutex);
 }
 
 static struct drm_driver driver = {
drivers/staging/vboxvideo/vbox_drv.h +0 -2
index 57e9f1f3ba65..f82e594eca4b 100644
@@ -166,8 +166,6 @@ void vbox_mode_fini(struct vbox_private *vbox);
 
 #define DRM_MODE_FB_CMD drm_mode_fb_cmd2
 
-void vbox_enable_accel(struct vbox_private *vbox);
-void vbox_disable_accel(struct vbox_private *vbox);
 void vbox_report_caps(struct vbox_private *vbox);
 
 void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb,
drivers/staging/vboxvideo/vbox_main.c +16 -44

100 lines not on this page · raw message

Signature · 6 lines
2.19.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel