mirror of https://gitee.com/openkylin/linux.git
drm/qxl: Add line after variable declarations
Add whiteline after variable declarations to remove the checkpath.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Shayenne da Luz Moura <shayenneluzmoura@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/a1d44c4a30f9b52d0aa7113e4e5093e843f9913b.1540579956.git.shayenneluzmoura@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
6ed00154cb
commit
408799eb4a
|
@ -84,6 +84,7 @@ static int qxl_check_header(struct qxl_ring *ring)
|
|||
int ret;
|
||||
struct qxl_ring_header *header = &(ring->ring->header);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&ring->lock, flags);
|
||||
ret = header->prod - header->cons < header->num_items;
|
||||
if (ret == 0)
|
||||
|
@ -97,6 +98,7 @@ int qxl_check_idle(struct qxl_ring *ring)
|
|||
int ret;
|
||||
struct qxl_ring_header *header = &(ring->ring->header);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&ring->lock, flags);
|
||||
ret = header->prod == header->cons;
|
||||
spin_unlock_irqrestore(&ring->lock, flags);
|
||||
|
@ -110,6 +112,7 @@ int qxl_ring_push(struct qxl_ring *ring,
|
|||
uint8_t *elt;
|
||||
int idx, ret;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&ring->lock, flags);
|
||||
if (header->prod - header->cons == header->num_items) {
|
||||
header->notify_on_cons = header->cons + 1;
|
||||
|
@ -156,6 +159,7 @@ static bool qxl_ring_pop(struct qxl_ring *ring,
|
|||
volatile uint8_t *ring_elt;
|
||||
int idx;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&ring->lock, flags);
|
||||
if (header->cons == header->prod) {
|
||||
header->notify_on_prod = header->cons + 1;
|
||||
|
|
|
@ -259,6 +259,7 @@ static int qxl_add_common_modes(struct drm_connector *connector,
|
|||
struct drm_device *dev = connector->dev;
|
||||
struct drm_display_mode *mode = NULL;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(common_modes); i++) {
|
||||
mode = drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h,
|
||||
60, false, false, false);
|
||||
|
@ -315,6 +316,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
|
|||
oldcount = qdev->monitors_config->count;
|
||||
if (crtc->state->active) {
|
||||
struct drm_display_mode *mode = &crtc->mode;
|
||||
|
||||
head.width = mode->hdisplay;
|
||||
head.height = mode->vdisplay;
|
||||
head.x = crtc->x;
|
||||
|
|
|
@ -168,6 +168,7 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image,
|
|||
int ret;
|
||||
struct qxl_drm_image *dimage;
|
||||
struct qxl_bo *palette_bo = NULL;
|
||||
|
||||
if (stride == 0)
|
||||
stride = depth * width / 8;
|
||||
|
||||
|
@ -214,6 +215,7 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image,
|
|||
|
||||
if (depth == 1) {
|
||||
void *ptr;
|
||||
|
||||
ret = qxl_palette_create_1bit(palette_bo, release, qxl_fb_image);
|
||||
|
||||
ptr = qxl_bo_kmap_atomic_page(qdev, dimage->bo, 0);
|
||||
|
|
|
@ -38,6 +38,7 @@ int qxl_mode_dumb_create(struct drm_file *file_priv,
|
|||
int r;
|
||||
struct qxl_surface surf;
|
||||
uint32_t pitch, format;
|
||||
|
||||
pitch = args->width * ((args->bpp + 1) / 8);
|
||||
args->size = pitch * args->height;
|
||||
args->size = ALIGN(args->size, PAGE_SIZE);
|
||||
|
|
|
@ -136,6 +136,7 @@ qxl_image_init_helper(struct qxl_device *qdev,
|
|||
int remain;
|
||||
int page;
|
||||
int size;
|
||||
|
||||
if (stride == linesize && chunk_stride == stride) {
|
||||
remain = linesize * height;
|
||||
page = 0;
|
||||
|
@ -163,6 +164,7 @@ qxl_image_init_helper(struct qxl_device *qdev,
|
|||
}
|
||||
} else {
|
||||
unsigned page_base, page_offset, out_offset;
|
||||
|
||||
for (i = 0 ; i < height ; ++i) {
|
||||
i_data = (void *)data + i * stride;
|
||||
remain = linesize;
|
||||
|
|
|
@ -85,6 +85,7 @@ static void
|
|||
apply_reloc(struct qxl_device *qdev, struct qxl_reloc_info *info)
|
||||
{
|
||||
void *reloc_page;
|
||||
|
||||
reloc_page = qxl_bo_kmap_atomic_page(qdev, info->dst_bo, info->dst_offset & PAGE_MASK);
|
||||
*(uint64_t *)(reloc_page + (info->dst_offset & ~PAGE_MASK)) = qxl_bo_physical_address(qdev,
|
||||
info->src_bo,
|
||||
|
@ -189,6 +190,7 @@ static int qxl_process_single_command(struct qxl_device *qdev,
|
|||
|
||||
{
|
||||
struct qxl_drawable *draw = fb_cmd;
|
||||
|
||||
draw->mm_time = qdev->rom->mm_clock;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ void qxl_reinit_memslots(struct qxl_device *qdev)
|
|||
static void qxl_gc_work(struct work_struct *work)
|
||||
{
|
||||
struct qxl_device *qdev = container_of(work, struct qxl_device, gc_work);
|
||||
|
||||
qxl_garbage_collect(qdev);
|
||||
}
|
||||
|
||||
|
|
|
@ -335,6 +335,7 @@ void qxl_bo_fini(struct qxl_device *qdev)
|
|||
int qxl_bo_check_id(struct qxl_device *qdev, struct qxl_bo *bo)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (bo->type == QXL_GEM_DOMAIN_SURFACE && bo->surface_id == 0) {
|
||||
/* allocate a surface id for this surface now */
|
||||
ret = qxl_surface_id_alloc(qdev, bo);
|
||||
|
|
|
@ -35,6 +35,7 @@ static inline int qxl_bo_reserve(struct qxl_bo *bo, bool no_wait)
|
|||
if (unlikely(r != 0)) {
|
||||
if (r != -ERESTARTSYS) {
|
||||
struct drm_device *ddev = bo->gem_base.dev;
|
||||
|
||||
dev_err(ddev->dev, "%p reserve failed\n", bo);
|
||||
}
|
||||
return r;
|
||||
|
@ -71,6 +72,7 @@ static inline int qxl_bo_wait(struct qxl_bo *bo, u32 *mem_type,
|
|||
if (unlikely(r != 0)) {
|
||||
if (r != -ERESTARTSYS) {
|
||||
struct drm_device *ddev = bo->gem_base.dev;
|
||||
|
||||
dev_err(ddev->dev, "%p reserve failed for wait\n",
|
||||
bo);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue