search for: is_primary

Displaying 20 results from an estimated 49 matches for "is_primary".

2018 Dec 12
0
[PATCH v2 13/18] drm/qxl: use shadow bo directly
Pass the shadow bo to qxl_io_create_primary() instead of expecting qxl_io_create_primary to check bo->shadow. Set is_primary flag on the shadow bo. Move the is_primary tracking into qxl_io_create_primary() and qxl_io_destroy_primary() functions. That simplifies primary surface tracking and the workflow in qxl_primary_atomic_update(). Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/qxl/qx...
2014 Nov 28
2
Re: [PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...tems, sometimes /dev/sda[1234] is a shadow of the real root > + * filesystem that is probably /dev/sda5 > + * (see: http://www.freebsd.org/doc/handbook/disk-organization.html) > + */ > +static void > +check_for_duplicated_bsd_root (guestfs_h *g) > +{ > + size_t i; > + bool is_primary, is_bsd; > + struct inspect_fs *fs, *bsd_primary = NULL; > + > + for (i = 0; i < g->nr_fses; ++i) { > + fs = &g->fses[i]; > + > + is_primary = match (g, fs->mountable, re_primary_partition); > + is_bsd = > + fs->type == OS_TYPE_FREEBSD || &...
2018 Nov 28
0
[PATCH 4/6] drm/qxl: use shadow bo directly
Pass the shadow bo to qxl_io_create_primary() instead of expecting qxl_io_create_primary to check bo->shadow. Set is_primary flag on the shadow bo. Move the is_primary tracking into qxl_io_create_primary() and qxl_io_destroy_primary() functions. That simplifies primary surface tracking and the workflow in qxl_primary_atomic_update(). Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/qxl/qx...
2006 May 08
8
enforcing special behavior of child rows in HABTM
Hi, I have a scenario where a doctor can have one or more specialties. For each doctor, one and only one of her specialties can be designated as primary. So I have tables called doctors, specialties, and doctors_specialties, the last of which has a boolean is_primary column. The doctor model class specifies that: has_and_belongs_to_many :specialties I want to enforce, at the lowest possible level, the constraint that a doctor can only have one primary specialty. So, whenever a member of the association is added or updated with the value is_primary set to tr...
2014 Nov 27
2
[PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...fses (guestfs_h *g); +/* On *BSD systems, sometimes /dev/sda[1234] is a shadow of the real root + * filesystem that is probably /dev/sda5 + * (see: http://www.freebsd.org/doc/handbook/disk-organization.html) + */ +void +guestfs___check_for_dublicated_bsd_root(guestfs_h *g) +{ + size_t i; + bool is_primary, is_bsd; + struct inspect_fs *fs, *bsd_primary = NULL; + + for (i = 0; i < g->nr_fses; ++i) { + fs = &g->fses[i]; + + is_primary = match (g, fs->mountable, re_primary_partition); + is_bsd = ((fs->type == OS_TYPE_FREEBSD) || \ + (fs->type == OS_TYPE_NETB...
2014 Nov 28
0
Re: [PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...ow of the real root > > + * filesystem that is probably /dev/sda5 > > + * (see: http://www.freebsd.org/doc/handbook/disk-organization.html) > > + */ > > +static void > > +check_for_duplicated_bsd_root (guestfs_h *g) > > +{ > > + size_t i; > > + bool is_primary, is_bsd; > > + struct inspect_fs *fs, *bsd_primary = NULL; > > + > > + for (i = 0; i < g->nr_fses; ++i) { > > + fs = &g->fses[i]; > > + > > + is_primary = match (g, fs->mountable, re_primary_partition); > > + is_bsd = > > +...
2014 Nov 28
1
Re: [synnefo-devel] Re: [PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...>> + * filesystem that is probably /dev/sda5 >>> + * (see: http://www.freebsd.org/doc/handbook/disk-organization.html) >>> + */ >>> +static void >>> +check_for_duplicated_bsd_root (guestfs_h *g) >>> +{ >>> + size_t i; >>> + bool is_primary, is_bsd; >>> + struct inspect_fs *fs, *bsd_primary = NULL; >>> + >>> + for (i = 0; i < g->nr_fses; ++i) { >>> + fs = &g->fses[i]; >>> + >>> + is_primary = match (g, fs->mountable, re_primary_partition); >>> +...
2018 Nov 28
0
[PATCH 1/6] drm/qxl: move qxl_primary_apply_cursor to correct place
...>state->fb->width, .y2 = plane->state->fb->height }; - int ret; bool same_shadow = false; if (old_state->fb) { @@ -554,16 +553,13 @@ static void qxl_primary_atomic_update(struct drm_plane *plane, if (!same_shadow) qxl_io_destroy_primary(qdev); bo_old->is_primary = false; - - ret = qxl_primary_apply_cursor(plane); - if (ret) - DRM_ERROR( - "could not set cursor after creating primary"); } if (!bo->is_primary) { - if (!same_shadow) + if (!same_shadow) { qxl_io_create_primary(qdev, 0, bo); + qxl_primary_apply_cursor(plane); +...
2018 Dec 12
0
[PATCH v2 10/18] drm/qxl: move qxl_primary_apply_cursor to correct place
...>state->fb->width, .y2 = plane->state->fb->height }; - int ret; bool same_shadow = false; if (old_state->fb) { @@ -554,16 +553,13 @@ static void qxl_primary_atomic_update(struct drm_plane *plane, if (!same_shadow) qxl_io_destroy_primary(qdev); bo_old->is_primary = false; - - ret = qxl_primary_apply_cursor(plane); - if (ret) - DRM_ERROR( - "could not set cursor after creating primary"); } if (!bo->is_primary) { - if (!same_shadow) + if (!same_shadow) { qxl_io_create_primary(qdev, 0, bo); + qxl_primary_apply_cursor(plane); +...
2018 Nov 28
0
[PATCH 2/6] drm/qxl: drop unused offset parameter from qxl_io_create_primary()
...; diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 58fb2c4308..d875cae02f 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -557,7 +557,7 @@ static void qxl_primary_atomic_update(struct drm_plane *plane, if (!bo->is_primary) { if (!same_shadow) { - qxl_io_create_primary(qdev, 0, bo); + qxl_io_create_primary(qdev, bo); qxl_primary_apply_cursor(plane); } bo->is_primary = true; -- 2.9.3
2018 Dec 12
0
[PATCH v2 11/18] drm/qxl: drop unused offset parameter from qxl_io_create_primary()
...; diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index a4bdcca715..79dc8a1fa3 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -557,7 +557,7 @@ static void qxl_primary_atomic_update(struct drm_plane *plane, if (!bo->is_primary) { if (!same_shadow) { - qxl_io_create_primary(qdev, 0, bo); + qxl_io_create_primary(qdev, bo); qxl_primary_apply_cursor(plane); } bo->is_primary = true; -- 2.9.3
2020 Sep 08
0
[PATCH 3/3] drm/qxl: handle shadow in primary destroy
...rm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -560,6 +560,8 @@ static void qxl_primary_atomic_disable(struct drm_plane *plane, if (old_state->fb) { struct qxl_bo *bo = gem_to_qxl_bo(old_state->fb->obj[0]); + if (bo->shadow) + bo = bo->shadow; if (bo->is_primary) { qxl_io_destroy_primary(qdev); bo->is_primary = false; -- 2.27.0
2020 Sep 29
0
[PATCH v2 3/4] drm/qxl: handle shadow in primary destroy
...rm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -561,6 +561,8 @@ static void qxl_primary_atomic_disable(struct drm_plane *plane, if (old_state->fb) { struct qxl_bo *bo = gem_to_qxl_bo(old_state->fb->obj[0]); + if (bo->shadow) + bo = bo->shadow; if (bo->is_primary) { qxl_io_destroy_primary(qdev); bo->is_primary = false; -- 2.27.0
2006 Jan 17
1
many-to-many with extra fields
I''m trying to work with a many-to-many relationship, but the join table needs to have a is_primary field. What is the best way to work with this (adding / changing primary / deleting)? I understand that the :through option in Edge Rails can handle this better, but I was just wondering if there was a good way to handle this with Rails 1.0. Thanks, Kyle
2019 Jun 20
0
[PATCH 3/6] drm/qxl: use embedded gem object
...ct ttm_placement placement; - struct ttm_buffer_object tbo; struct ttm_bo_kmap_obj kmap; unsigned int pin_count; void *kptr; @@ -85,7 +86,6 @@ struct qxl_bo { int type; /* Constant after initialization */ - struct drm_gem_object gem_base; unsigned int is_primary:1; /* is this now a primary surface */ unsigned int is_dumb:1; struct qxl_bo *shadow; @@ -94,7 +94,7 @@ struct qxl_bo { uint32_t surface_id; struct qxl_release *surf_create; }; -#define gem_to_qxl_bo(gobj) container_of((gobj), struct qxl_bo, gem_base) +#define gem_to_qxl_bo(gobj) container...
2019 Jun 21
0
[PATCH v2 03/18] drm/qxl: use embedded gem object
...ct ttm_placement placement; - struct ttm_buffer_object tbo; struct ttm_bo_kmap_obj kmap; unsigned int pin_count; void *kptr; @@ -85,7 +86,6 @@ struct qxl_bo { int type; /* Constant after initialization */ - struct drm_gem_object gem_base; unsigned int is_primary:1; /* is this now a primary surface */ unsigned int is_dumb:1; struct qxl_bo *shadow; @@ -94,7 +94,7 @@ struct qxl_bo { uint32_t surface_id; struct qxl_release *surf_create; }; -#define gem_to_qxl_bo(gobj) container_of((gobj), struct qxl_bo, gem_base) +#define gem_to_qxl_bo(gobj) container...
2019 Jun 28
0
[PATCH v3 03/18] drm/qxl: use embedded gem object
...ct ttm_placement placement; - struct ttm_buffer_object tbo; struct ttm_bo_kmap_obj kmap; unsigned int pin_count; void *kptr; @@ -85,7 +86,6 @@ struct qxl_bo { int type; /* Constant after initialization */ - struct drm_gem_object gem_base; unsigned int is_primary:1; /* is this now a primary surface */ unsigned int is_dumb:1; struct qxl_bo *shadow; @@ -94,7 +94,7 @@ struct qxl_bo { uint32_t surface_id; struct qxl_release *surf_create; }; -#define gem_to_qxl_bo(gobj) container_of((gobj), struct qxl_bo, gem_base) +#define gem_to_qxl_bo(gobj) container...
2019 Aug 02
0
[PATCH v4 03/17] drm/qxl: use embedded gem object
...ct ttm_placement placement; - struct ttm_buffer_object tbo; struct ttm_bo_kmap_obj kmap; unsigned int pin_count; void *kptr; @@ -84,7 +85,6 @@ struct qxl_bo { int type; /* Constant after initialization */ - struct drm_gem_object gem_base; unsigned int is_primary:1; /* is this now a primary surface */ unsigned int is_dumb:1; struct qxl_bo *shadow; @@ -93,7 +93,7 @@ struct qxl_bo { uint32_t surface_id; struct qxl_release *surf_create; }; -#define gem_to_qxl_bo(gobj) container_of((gobj), struct qxl_bo, gem_base) +#define gem_to_qxl_bo(gobj) container...
2019 Aug 05
0
[PATCH v5 03/18] drm/qxl: use embedded gem object
...ct ttm_placement placement; - struct ttm_buffer_object tbo; struct ttm_bo_kmap_obj kmap; unsigned int pin_count; void *kptr; @@ -84,7 +85,6 @@ struct qxl_bo { int type; /* Constant after initialization */ - struct drm_gem_object gem_base; unsigned int is_primary:1; /* is this now a primary surface */ unsigned int is_dumb:1; struct qxl_bo *shadow; @@ -93,7 +93,7 @@ struct qxl_bo { uint32_t surface_id; struct qxl_release *surf_create; }; -#define gem_to_qxl_bo(gobj) container_of((gobj), struct qxl_bo, gem_base) +#define gem_to_qxl_bo(gobj) container...
2019 Aug 05
0
[PATCH v6 03/17] drm/qxl: use embedded gem object
...ct ttm_placement placement; - struct ttm_buffer_object tbo; struct ttm_bo_kmap_obj kmap; unsigned int pin_count; void *kptr; @@ -84,7 +85,6 @@ struct qxl_bo { int type; /* Constant after initialization */ - struct drm_gem_object gem_base; unsigned int is_primary:1; /* is this now a primary surface */ unsigned int is_dumb:1; struct qxl_bo *shadow; @@ -93,7 +93,7 @@ struct qxl_bo { uint32_t surface_id; struct qxl_release *surf_create; }; -#define gem_to_qxl_bo(gobj) container_of((gobj), struct qxl_bo, gem_base) +#define gem_to_qxl_bo(gobj) container...