* [PATCH 13/16] drm/virtio: removed optional dummy crtc mode_fixup function.
From: Carlos Palminha @ 2016-02-16 14:19 UTC (permalink / raw)
To: airlied, dri-devel, daniel.vetter, patrik.r.jakobsson,
virtualization
Cc: nicolas.pitre, boris.brezillon, jianwei.wang.chn, jani.nikula,
alison.wang, CARLOS.PALMINHA, linux-renesas-soc, laurent.pinchart,
benjamin.gaignard, vincent.abriou, sudipm.mukherjee
In-Reply-To: <cover.1455630967.git.palminha@synopsys.com>
This patch set nukes all the dummy crtc mode_fixup implementations.
(made on top of Daniel topic/drm-misc branch)
Signed-off-by: Carlos Palminha <palminha@synopsys.com>
---
drivers/gpu/drm/virtio/virtgpu_display.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index a165f03..6a6cb73 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -237,13 +237,6 @@ virtio_gpu_framebuffer_init(struct drm_device *dev,
return 0;
}
-static bool virtio_gpu_crtc_mode_fixup(struct drm_crtc *crtc,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void virtio_gpu_crtc_mode_set_nofb(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
@@ -277,7 +270,6 @@ static int virtio_gpu_crtc_atomic_check(struct drm_crtc *crtc,
static const struct drm_crtc_helper_funcs virtio_gpu_crtc_helper_funcs = {
.enable = virtio_gpu_crtc_enable,
.disable = virtio_gpu_crtc_disable,
- .mode_fixup = virtio_gpu_crtc_mode_fixup,
.mode_set_nofb = virtio_gpu_crtc_mode_set_nofb,
.atomic_check = virtio_gpu_crtc_atomic_check,
};
--
2.5.0
^ permalink raw reply related
* [PATCH 14/16] drm/fsl-dcu: removed optional dummy crtc mode_fixup function.
From: Carlos Palminha @ 2016-02-16 14:19 UTC (permalink / raw)
To: airlied, dri-devel, daniel.vetter, patrik.r.jakobsson,
virtualization
Cc: nicolas.pitre, boris.brezillon, jianwei.wang.chn, jani.nikula,
alison.wang, CARLOS.PALMINHA, linux-renesas-soc, laurent.pinchart,
benjamin.gaignard, vincent.abriou, sudipm.mukherjee
In-Reply-To: <cover.1455630967.git.palminha@synopsys.com>
This patch set nukes all the dummy crtc mode_fixup implementations.
(made on top of Daniel topic/drm-misc branch)
Signed-off-by: Carlos Palminha <palminha@synopsys.com>
---
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
index d8ab8f0..9aa6ad5 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
@@ -72,13 +72,6 @@ static void fsl_dcu_drm_crtc_enable(struct drm_crtc *crtc)
dev_err(fsl_dev->dev, "Enable CRTC failed\n");
}
-static bool fsl_dcu_drm_crtc_mode_fixup(struct drm_crtc *crtc,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void fsl_dcu_drm_crtc_mode_set_nofb(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
@@ -153,7 +146,6 @@ static const struct drm_crtc_helper_funcs fsl_dcu_drm_crtc_helper_funcs = {
.atomic_flush = fsl_dcu_drm_crtc_atomic_flush,
.disable = fsl_dcu_drm_disable_crtc,
.enable = fsl_dcu_drm_crtc_enable,
- .mode_fixup = fsl_dcu_drm_crtc_mode_fixup,
.mode_set_nofb = fsl_dcu_drm_crtc_mode_set_nofb,
};
--
2.5.0
^ permalink raw reply related
* [PATCH 15/16] drm/bochs: removed optional dummy crtc mode_fixup function.
From: Carlos Palminha @ 2016-02-16 14:20 UTC (permalink / raw)
To: airlied, dri-devel, daniel.vetter, patrik.r.jakobsson,
virtualization
Cc: nicolas.pitre, boris.brezillon, jianwei.wang.chn, jani.nikula,
alison.wang, CARLOS.PALMINHA, linux-renesas-soc, laurent.pinchart,
benjamin.gaignard, vincent.abriou, sudipm.mukherjee
In-Reply-To: <cover.1455630967.git.palminha@synopsys.com>
This patch set nukes all the dummy crtc mode_fixup implementations.
(made on top of Daniel topic/drm-misc branch)
Signed-off-by: Carlos Palminha <palminha@synopsys.com>
---
drivers/gpu/drm/bochs/bochs_kms.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
index 2849f1b..c922b48 100644
--- a/drivers/gpu/drm/bochs/bochs_kms.c
+++ b/drivers/gpu/drm/bochs/bochs_kms.c
@@ -30,13 +30,6 @@ static void bochs_crtc_dpms(struct drm_crtc *crtc, int mode)
}
}
-static bool bochs_crtc_mode_fixup(struct drm_crtc *crtc,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
struct drm_framebuffer *old_fb)
{
@@ -135,7 +128,6 @@ static const struct drm_crtc_funcs bochs_crtc_funcs = {
static const struct drm_crtc_helper_funcs bochs_helper_funcs = {
.dpms = bochs_crtc_dpms,
- .mode_fixup = bochs_crtc_mode_fixup,
.mode_set = bochs_crtc_mode_set,
.mode_set_base = bochs_crtc_mode_set_base,
.prepare = bochs_crtc_prepare,
--
2.5.0
^ permalink raw reply related
* [PATCH 16/16] drm/ast: removed optional dummy crtc mode_fixup function.
From: Carlos Palminha @ 2016-02-16 14:20 UTC (permalink / raw)
To: airlied, dri-devel, daniel.vetter, patrik.r.jakobsson,
virtualization
Cc: nicolas.pitre, boris.brezillon, jianwei.wang.chn, jani.nikula,
alison.wang, CARLOS.PALMINHA, linux-renesas-soc, laurent.pinchart,
benjamin.gaignard, vincent.abriou, sudipm.mukherjee
In-Reply-To: <cover.1455630967.git.palminha@synopsys.com>
This patch set nukes all the dummy crtc mode_fixup implementations.
(made on top of Daniel topic/drm-misc branch)
Signed-off-by: Carlos Palminha <palminha@synopsys.com>
---
drivers/gpu/drm/ast/ast_mode.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index 0123458..0deeecd 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -497,13 +497,6 @@ static void ast_crtc_dpms(struct drm_crtc *crtc, int mode)
}
}
-static bool ast_crtc_mode_fixup(struct drm_crtc *crtc,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
/* ast is different - we will force move buffers out of VRAM */
static int ast_crtc_do_set_base(struct drm_crtc *crtc,
struct drm_framebuffer *fb,
@@ -617,7 +610,6 @@ static void ast_crtc_commit(struct drm_crtc *crtc)
static const struct drm_crtc_helper_funcs ast_crtc_helper_funcs = {
.dpms = ast_crtc_dpms,
- .mode_fixup = ast_crtc_mode_fixup,
.mode_set = ast_crtc_mode_set,
.mode_set_base = ast_crtc_mode_set_base,
.disable = ast_crtc_disable,
--
2.5.0
^ permalink raw reply related
* Re: [PATCH v2 03/17] drm/exynos: removed optional dummy encoder mode_fixup function.
From: Daniel Vetter @ 2016-02-16 14:31 UTC (permalink / raw)
To: Patrik Jakobsson
Cc: k.kozlowski, linux-samsung-soc, jingoohan1, Carlos Palminha,
dri-devel, virtualization, linux-rockchip, kgene,
benjamin.gaignard, vincent.abriou, linux-arm-kernel
In-Reply-To: <CAMeQTsZLdMOnk7-isneoUyFBbQdiRUsGH6+EhD8W1LNB=80LVQ@mail.gmail.com>
On Mon, Feb 15, 2016 at 02:49:09PM +0100, Patrik Jakobsson wrote:
> Hi Carlos
>
> Any particular reason why this patch isn't squashed with patch 8/17?
I've squashed them while applying.
-Daniel
>
> Thanks
> Patrik
>
>
> On Mon, Feb 15, 2016 at 1:58 PM, Carlos Palminha
> <CARLOS.PALMINHA@synopsys.com> wrote:
> > mode_fixup function for encoder drivers became optional with patch
> > http://patchwork.freedesktop.org/patch/msgid/1455106522-32307-1-git-send-email-palminha@synopsys.com
> >
> > This patch set nukes all the dummy mode_fixup implementations.
> >
> > (made on top of Daniel topic/drm-misc branch)
> >
> > Signed-off-by: Carlos Palminha <palminha@synopsys.com>
> > ---
> > drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 --------
> > 1 file changed, 8 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> > index e977a81..736115c 100644
> > --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> > +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> > @@ -1597,13 +1597,6 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
> > return 0;
> > }
> >
> > -static bool exynos_dsi_mode_fixup(struct drm_encoder *encoder,
> > - const struct drm_display_mode *mode,
> > - struct drm_display_mode *adjusted_mode)
> > -{
> > - return true;
> > -}
> > -
> > static void exynos_dsi_mode_set(struct drm_encoder *encoder,
> > struct drm_display_mode *mode,
> > struct drm_display_mode *adjusted_mode)
> > @@ -1623,7 +1616,6 @@ static void exynos_dsi_mode_set(struct drm_encoder *encoder,
> > }
> >
> > static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = {
> > - .mode_fixup = exynos_dsi_mode_fixup,
> > .mode_set = exynos_dsi_mode_set,
> > .enable = exynos_dsi_enable,
> > .disable = exynos_dsi_disable,
> > --
> > 2.5.0
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply
* Re: [PATCH 01/16] drm: fixes crct set_mode when crtc mode_fixup is null.
From: Daniel Vetter @ 2016-02-16 14:37 UTC (permalink / raw)
To: Carlos Palminha
Cc: nicolas.pitre, boris.brezillon, jianwei.wang.chn, airlied,
daniel.vetter, alison.wang, patrik.r.jakobsson, virtualization,
linux-renesas-soc, jani.nikula, dri-devel, benjamin.gaignard,
vincent.abriou, sudipm.mukherjee, laurent.pinchart
In-Reply-To: <9d41105dee6632b4bb50e9555f2196ac249b9fce.1455630967.git.palminha@synopsys.com>
On Tue, Feb 16, 2016 at 02:10:03PM +0000, Carlos Palminha wrote:
> This patch set nukes all the dummy crtc mode_fixup implementations.
> (made on top of Daniel topic/drm-misc branch)
>
> Signed-off-by: Carlos Palminha <palminha@synopsys.com>
Applied this one to drm-misc. I'll let the others hang out there for a bit
more to collect acks.
Thanks, Daniel
> ---
> drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> index e70d064..7539eea 100644
> --- a/drivers/gpu/drm/drm_crtc_helper.c
> +++ b/drivers/gpu/drm/drm_crtc_helper.c
> @@ -343,9 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
> }
> }
>
> - if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) {
> - DRM_DEBUG_KMS("CRTC fixup failed\n");
> - goto done;
> + if (crtc_funcs->mode_fixup) {
> + if (!(ret = crtc_funcs->mode_fixup(crtc, mode,
> + adjusted_mode))) {
> + DRM_DEBUG_KMS("CRTC fixup failed\n");
> + goto done;
> + }
> }
> DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
>
> --
> 2.5.0
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply
* Re: [PATCH v2 00/17] drm encoders cleanup: nuke optional dummy encoder mode_fixup function.
From: Daniel Vetter @ 2016-02-16 14:38 UTC (permalink / raw)
To: Carlos Palminha
Cc: k.kozlowski, linux-samsung-soc, jingoohan1, dri-devel,
virtualization, linux-rockchip, kgene, benjamin.gaignard,
vincent.abriou, linux-arm-kernel
In-Reply-To: <cover.1455540137.git.palminha@synopsys.com>
On Mon, Feb 15, 2016 at 12:57:04PM +0000, Carlos Palminha wrote:
> mode_fixup function for encoder drivers became optional with patch
> http://patchwork.freedesktop.org/patch/msgid/1455106522-32307-1-git-send-email-palminha@synopsys.com
>
> This patch set nukes all the dummy mode_fixup implementations.
>
> (made on top of Daniel topic/drm-misc branch)
>
> Changes v1->v2: incorporated Daniel comments
> * added signed-off-by line to all patches
> * threading enabled due to e-mail server constraints
> * common blurb lines to all patches
> * add reviewed by Alex, to patches 4 and 14
I've thrown them all into a topic branch for soaking, and plan to merge
into drm-misc in the next few days.
Thanks, Daniel
>
> Carlos Palminha (17):
> drm/virtio: removed optional dummy encoder mode_fixup function.
> drm/udl: removed optional dummy encoder mode_fixup function.
> drm/exynos: removed optional dummy encoder mode_fixup function.
> drm/amdgpu: removed optional dummy encoder mode_fixup function.
> drm/ast: removed optional dummy encoder mode_fixup function.
> drm/bochs: removed optional dummy encoder mode_fixup function.
> drm/cirrus: removed optional dummy encoder mode_fixup function.
> drm/exynos: removed optional dummy encoder mode_fixup function.
> drm/gma500: removed optional dummy encoder mode_fixup function.
> drm/imx: removed optional dummy encoder mode_fixup function.
> drm/msm/mdp: removed optional dummy encoder mode_fixup function.
> drm/mgag200: removed optional dummy encoder mode_fixup function.
> drm/qxl: removed optional dummy encoder mode_fixup function.
> drm/radeon: removed optional dummy encoder mode_fixup function.
> drm/rockchip: removed optional dummy encoder mode_fixup function.
> drm/sti: removed optional dummy encoder mode_fixup function.
> drm/tilcdc: removed optional dummy encoder mode_fixup function.
>
> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 8 --------
> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 8 --------
> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 8 --------
> drivers/gpu/drm/ast/ast_mode.c | 8 --------
> drivers/gpu/drm/bochs/bochs_kms.c | 8 --------
> drivers/gpu/drm/cirrus/cirrus_mode.c | 9 ---------
> drivers/gpu/drm/exynos/exynos_dp_core.c | 8 --------
> drivers/gpu/drm/exynos/exynos_drm_dpi.c | 8 --------
> drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 --------
> drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 --------
> drivers/gpu/drm/gma500/cdv_intel_crt.c | 1 -
> drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 1 -
> drivers/gpu/drm/gma500/gma_display.c | 7 -------
> drivers/gpu/drm/gma500/gma_display.h | 3 ---
> drivers/gpu/drm/gma500/oaktrail_hdmi.c | 1 -
> drivers/gpu/drm/imx/dw_hdmi-imx.c | 8 --------
> drivers/gpu/drm/imx/imx-ldb.c | 8 --------
> drivers/gpu/drm/imx/imx-tve.c | 8 --------
> drivers/gpu/drm/imx/parallel-display.c | 8 --------
> drivers/gpu/drm/mgag200/mgag200_mode.c | 8 --------
> drivers/gpu/drm/msm/mdp/mdp4/mdp4_dsi_encoder.c | 8 --------
> drivers/gpu/drm/msm/mdp/mdp4/mdp4_dtv_encoder.c | 8 --------
> drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c | 8 --------
> drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c | 9 ---------
> drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 8 --------
> drivers/gpu/drm/qxl/qxl_display.c | 9 ---------
> drivers/gpu/drm/radeon/atombios_encoders.c | 8 --------
> drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 8 --------
> drivers/gpu/drm/sti/sti_tvout.c | 10 ----------
> drivers/gpu/drm/tilcdc/tilcdc_panel.c | 9 ---------
> drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 9 ---------
> drivers/gpu/drm/udl/udl_encoder.c | 8 --------
> drivers/gpu/drm/virtio/virtgpu_display.c | 8 --------
> 33 files changed, 244 deletions(-)
>
> --
> 2.5.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply
* [PATCH v2 0/3] vhost: cross-endian code cleanup
From: Greg Kurz @ 2016-02-16 14:54 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: netdev, linux-kernel, kvm, virtualization
This series is a new tentative to have cleaner cross-endian code.
Patches 1/3 is new: it fixes a side-effect in case vhost_init_used() fails.
Patch 2/3 comes from v1: it renames cross-endian helpers
Patch 3/3 is new: it simply renames vhost_init_used() as suggested by Michael.
---
Greg Kurz (3):
vhost: fix error path in vhost_init_used()
vhost: rename cross-endian helpers
vhost: rename vhost_init_used()
drivers/vhost/net.c | 2 +-
drivers/vhost/scsi.c | 2 +-
drivers/vhost/test.c | 2 +-
drivers/vhost/vhost.c | 49 +++++++++++++++++++++++++++++++++++++------------
drivers/vhost/vhost.h | 2 +-
5 files changed, 41 insertions(+), 16 deletions(-)
^ permalink raw reply
* [PATCH v2 1/3] vhost: fix error path in vhost_init_used()
From: Greg Kurz @ 2016-02-16 14:54 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: netdev, linux-kernel, kvm, virtualization
In-Reply-To: <20160216145418.7448.71329.stgit@bahia.lab.toulouse-stg.fr.ibm.com>
We don't want side effects. If something fails, we rollback vq->is_le to
its previous value.
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
---
drivers/vhost/vhost.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index ad2146a9ab2d..236553e81027 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -1156,6 +1156,8 @@ int vhost_init_used(struct vhost_virtqueue *vq)
{
__virtio16 last_used_idx;
int r;
+ bool is_le = vq->is_le;
+
if (!vq->private_data) {
vq->is_le = virtio_legacy_is_little_endian();
return 0;
@@ -1165,15 +1167,20 @@ int vhost_init_used(struct vhost_virtqueue *vq)
r = vhost_update_used_flags(vq);
if (r)
- return r;
+ goto err;
vq->signalled_used_valid = false;
- if (!access_ok(VERIFY_READ, &vq->used->idx, sizeof vq->used->idx))
- return -EFAULT;
+ if (!access_ok(VERIFY_READ, &vq->used->idx, sizeof vq->used->idx)) {
+ r = -EFAULT;
+ goto err;
+ }
r = __get_user(last_used_idx, &vq->used->idx);
if (r)
- return r;
+ goto err;
vq->last_used_idx = vhost16_to_cpu(vq, last_used_idx);
return 0;
+err:
+ vq->is_le = is_le;
+ return r;
}
EXPORT_SYMBOL_GPL(vhost_init_used);
^ permalink raw reply related
* [PATCH v2 2/3] vhost: rename cross-endian helpers
From: Greg Kurz @ 2016-02-16 14:59 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: netdev, linux-kernel, kvm, virtualization
In-Reply-To: <20160216145418.7448.71329.stgit@bahia.lab.toulouse-stg.fr.ibm.com>
The default use case for vhost is when the host and the vring have the
same endianness (default native endianness). But there are cases where
they differ and vhost should byteswap when accessing the vring.
The first case is when the host is big endian and the vring belongs to
a virtio 1.0 device, which is always little endian.
This is covered by the vq->is_le field. This field is initialized when
userspace calls the VHOST_SET_FEATURES ioctl. It is reset when the device
stops.
We already have a vhost_init_is_le() helper, but the reset operation is
opencoded as follows:
vq->is_le = virtio_legacy_is_little_endian();
It isn't clear that we are resetting vq->is_le here.
This patch moves the code to a helper with a more explicit name.
The other case where we may have to byteswap is when the architecture can
switch endianness at runtime (bi-endian). If endianness differs in the host
and in the guest, then legacy devices need to be used in cross-endian mode.
This mode is available with CONFIG_VHOST_CROSS_ENDIAN_LEGACY=y, which
introduces a vq->user_be field. Userspace may enable cross-endian mode
by calling the SET_VRING_ENDIAN ioctl before the device is started. The
cross-endian mode is disabled when the device is stopped.
The current names of the helpers that manipulate vq->user_be are unclear.
This patch renames those helpers to clearly show that this is cross-endian
stuff and with explicit enable/disable semantics.
No behaviour change.
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
---
Changes since v1:
- use init/reset semantics for vq->is_le (Michael)
- use enable/disable semantics for vq->user_be (Cornelia)
- rewrote the changelog
---
drivers/vhost/vhost.c | 30 ++++++++++++++++++++++++------
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 236553e81027..69f6463e11bd 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -43,11 +43,21 @@ enum {
#define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
#ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
-static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
+static void vhost_disable_cross_endian(struct vhost_virtqueue *vq)
{
vq->user_be = !virtio_legacy_is_little_endian();
}
+static void vhost_enable_cross_endian_big(struct vhost_virtqueue *vq)
+{
+ vq->user_be = true;
+}
+
+static void vhost_enable_cross_endian_little(struct vhost_virtqueue *vq)
+{
+ vq->user_be = false;
+}
+
static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp)
{
struct vhost_vring_state s;
@@ -62,7 +72,10 @@ static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp)
s.num != VHOST_VRING_BIG_ENDIAN)
return -EINVAL;
- vq->user_be = s.num;
+ if (s.num == VHOST_VRING_BIG_ENDIAN)
+ vhost_enable_cross_endian_big(vq);
+ else
+ vhost_enable_cross_endian_little(vq);
return 0;
}
@@ -91,7 +104,7 @@ static void vhost_init_is_le(struct vhost_virtqueue *vq)
vq->is_le = vhost_has_feature(vq, VIRTIO_F_VERSION_1) || !vq->user_be;
}
#else
-static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
+static void vhost_disable_cross_endian(struct vhost_virtqueue *vq)
{
}
@@ -113,6 +126,11 @@ static void vhost_init_is_le(struct vhost_virtqueue *vq)
}
#endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */
+static void vhost_reset_is_le(struct vhost_virtqueue *vq)
+{
+ vq->is_le = virtio_legacy_is_little_endian();
+}
+
static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh,
poll_table *pt)
{
@@ -276,8 +294,8 @@ static void vhost_vq_reset(struct vhost_dev *dev,
vq->call = NULL;
vq->log_ctx = NULL;
vq->memory = NULL;
- vq->is_le = virtio_legacy_is_little_endian();
- vhost_vq_reset_user_be(vq);
+ vhost_reset_is_le(vq);
+ vhost_disable_cross_endian(vq);
}
static int vhost_worker(void *data)
@@ -1159,7 +1177,7 @@ int vhost_init_used(struct vhost_virtqueue *vq)
bool is_le = vq->is_le;
if (!vq->private_data) {
- vq->is_le = virtio_legacy_is_little_endian();
+ vhost_reset_is_le(vq);
return 0;
}
^ permalink raw reply related
* [PATCH v2 3/3] vhost: rename vhost_init_used()
From: Greg Kurz @ 2016-02-16 14:59 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: netdev, linux-kernel, kvm, virtualization
In-Reply-To: <20160216145418.7448.71329.stgit@bahia.lab.toulouse-stg.fr.ibm.com>
Looking at how callers use this, maybe we should just rename init_used
to vhost_vq_init_access. The _used suffix was a hint that we
access the vq used ring. But maybe what callers care about is
that it must be called after access_ok.
Also, this function manipulates the vq->is_le field which isn't related
to the vq used ring.
This patch simply renames vhost_init_used() to vhost_vq_init_access() as
suggested by Michael.
No behaviour change.
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
---
drivers/vhost/net.c | 2 +-
drivers/vhost/scsi.c | 2 +-
drivers/vhost/test.c | 2 +-
drivers/vhost/vhost.c | 4 ++--
drivers/vhost/vhost.h | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 9eda69e40678..7bd75ff8be26 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -917,7 +917,7 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd)
vhost_net_disable_vq(n, vq);
vq->private_data = sock;
- r = vhost_init_used(vq);
+ r = vhost_vq_init_access(vq);
if (r)
goto err_used;
r = vhost_net_enable_vq(n, vq);
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index 29cfc57d496e..f898686cdd93 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -1274,7 +1274,7 @@ vhost_scsi_set_endpoint(struct vhost_scsi *vs,
vq = &vs->vqs[i].vq;
mutex_lock(&vq->mutex);
vq->private_data = vs_tpg;
- vhost_init_used(vq);
+ vhost_vq_init_access(vq);
mutex_unlock(&vq->mutex);
}
ret = 0;
diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c
index f2882ac98726..388eec4e1a90 100644
--- a/drivers/vhost/test.c
+++ b/drivers/vhost/test.c
@@ -196,7 +196,7 @@ static long vhost_test_run(struct vhost_test *n, int test)
oldpriv = vq->private_data;
vq->private_data = priv;
- r = vhost_init_used(&n->vqs[index]);
+ r = vhost_vq_init_access(&n->vqs[index]);
mutex_unlock(&vq->mutex);
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 69f6463e11bd..328c54ab0154 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -1170,7 +1170,7 @@ static int vhost_update_avail_event(struct vhost_virtqueue *vq, u16 avail_event)
return 0;
}
-int vhost_init_used(struct vhost_virtqueue *vq)
+int vhost_vq_init_access(struct vhost_virtqueue *vq)
{
__virtio16 last_used_idx;
int r;
@@ -1200,7 +1200,7 @@ err:
vq->is_le = is_le;
return r;
}
-EXPORT_SYMBOL_GPL(vhost_init_used);
+EXPORT_SYMBOL_GPL(vhost_vq_init_access);
static int translate_desc(struct vhost_virtqueue *vq, u64 addr, u32 len,
struct iovec iov[], int iov_size)
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index d3f767448a72..8f0dd0d915d4 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -148,7 +148,7 @@ int vhost_get_vq_desc(struct vhost_virtqueue *,
struct vhost_log *log, unsigned int *log_num);
void vhost_discard_vq_desc(struct vhost_virtqueue *, int n);
-int vhost_init_used(struct vhost_virtqueue *);
+int vhost_vq_init_access(struct vhost_virtqueue *);
int vhost_add_used(struct vhost_virtqueue *, unsigned int head, int len);
int vhost_add_used_n(struct vhost_virtqueue *, struct vring_used_elem *heads,
unsigned count);
^ permalink raw reply related
* Re: [PATCH 01/16] drm: fixes crct set_mode when crtc mode_fixup is null.
From: Carlos Palminha @ 2016-02-16 15:24 UTC (permalink / raw)
To: Daniel Vetter, Carlos Palminha
Cc: nicolas.pitre, boris.brezillon, jianwei.wang.chn, airlied,
daniel.vetter, alison.wang, patrik.r.jakobsson, virtualization,
linux-renesas-soc, jani.nikula, dri-devel, benjamin.gaignard,
vincent.abriou, sudipm.mukherjee, laurent.pinchart
In-Reply-To: <20160216143733.GF32705@phenom.ffwll.local>
Thanks!
On 16-02-2016 14:37, Daniel Vetter wrote:
> On Tue, Feb 16, 2016 at 02:10:03PM +0000, Carlos Palminha wrote:
>> This patch set nukes all the dummy crtc mode_fixup implementations.
>> (made on top of Daniel topic/drm-misc branch)
>>
>> Signed-off-by: Carlos Palminha <palminha@synopsys.com>
>
> Applied this one to drm-misc. I'll let the others hang out there for a bit
> more to collect acks.
>
> Thanks, Daniel
>
>> ---
>> drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++---
>> 1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
>> index e70d064..7539eea 100644
>> --- a/drivers/gpu/drm/drm_crtc_helper.c
>> +++ b/drivers/gpu/drm/drm_crtc_helper.c
>> @@ -343,9 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
>> }
>> }
>>
>> - if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) {
>> - DRM_DEBUG_KMS("CRTC fixup failed\n");
>> - goto done;
>> + if (crtc_funcs->mode_fixup) {
>> + if (!(ret = crtc_funcs->mode_fixup(crtc, mode,
>> + adjusted_mode))) {
>> + DRM_DEBUG_KMS("CRTC fixup failed\n");
>> + goto done;
>> + }
>> }
>> DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
>>
>> --
>> 2.5.0
>>
>
^ permalink raw reply
* Re: [PATCH v2 0/3] vhost: cross-endian code cleanup
From: Michael S. Tsirkin @ 2016-02-16 15:34 UTC (permalink / raw)
To: Greg Kurz; +Cc: netdev, linux-kernel, kvm, virtualization
In-Reply-To: <20160216145418.7448.71329.stgit@bahia.lab.toulouse-stg.fr.ibm.com>
On Tue, Feb 16, 2016 at 03:54:18PM +0100, Greg Kurz wrote:
> This series is a new tentative to have cleaner cross-endian code.
>
> Patches 1/3 is new: it fixes a side-effect in case vhost_init_used() fails.
>
> Patch 2/3 comes from v1: it renames cross-endian helpers
>
> Patch 3/3 is new: it simply renames vhost_init_used() as suggested by Michael.
Is this on top of my tree?
> ---
>
> Greg Kurz (3):
> vhost: fix error path in vhost_init_used()
> vhost: rename cross-endian helpers
> vhost: rename vhost_init_used()
>
>
> drivers/vhost/net.c | 2 +-
> drivers/vhost/scsi.c | 2 +-
> drivers/vhost/test.c | 2 +-
> drivers/vhost/vhost.c | 49 +++++++++++++++++++++++++++++++++++++------------
> drivers/vhost/vhost.h | 2 +-
> 5 files changed, 41 insertions(+), 16 deletions(-)
^ permalink raw reply
* Re: [PATCH v2 0/3] vhost: cross-endian code cleanup
From: Greg Kurz @ 2016-02-16 15:43 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: netdev, linux-kernel, kvm, virtualization
In-Reply-To: <20160216153413.GA32554@redhat.com>
On Tue, 16 Feb 2016 17:34:13 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Tue, Feb 16, 2016 at 03:54:18PM +0100, Greg Kurz wrote:
> > This series is a new tentative to have cleaner cross-endian code.
> >
> > Patches 1/3 is new: it fixes a side-effect in case vhost_init_used() fails.
> >
> > Patch 2/3 comes from v1: it renames cross-endian helpers
> >
> > Patch 3/3 is new: it simply renames vhost_init_used() as suggested by Michael.
>
> Is this on top of my tree?
>
No it's on top of Linus's but I can rebase.
> > ---
> >
> > Greg Kurz (3):
> > vhost: fix error path in vhost_init_used()
> > vhost: rename cross-endian helpers
> > vhost: rename vhost_init_used()
> >
> >
> > drivers/vhost/net.c | 2 +-
> > drivers/vhost/scsi.c | 2 +-
> > drivers/vhost/test.c | 2 +-
> > drivers/vhost/vhost.c | 49 +++++++++++++++++++++++++++++++++++++------------
> > drivers/vhost/vhost.h | 2 +-
> > 5 files changed, 41 insertions(+), 16 deletions(-)
>
^ permalink raw reply
* [PATCH 0/2] export 'available' memory to virtio balloon statistics
From: Denis V. Lunev @ 2016-02-16 15:50 UTC (permalink / raw)
Cc: Igor Redko, Michael S. Tsirkin, linux-kernel, virtualization,
Denis V. Lunev, Andrew Morton
Add a new field, VIRTIO_BALLOON_S_AVAIL, to virtio_balloon memory
statistics protocol, corresponding to 'Available' in /proc/meminfo.
It indicates to the hypervisor how big the balloon can be inflated
without pushing the guest system to swap. This metric would be very
useful in VM orchestration software to improve memory management
of different VMs under overcommit.
Signed-off-by: Igor Redko <redkoi@virtuozzo.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael S. Tsirkin <mst@redhat.com>
CC: Andrew Morton <akpm@linux-foundation.org>
Igor Redko (2):
calculate 'available' memory in the separate function
virtio_balloon: export 'available' memory to balloon statistics
drivers/virtio/virtio_balloon.c | 6 ++++++
fs/proc/meminfo.c | 31 +-------------------------
include/linux/mm.h | 1 +
include/uapi/linux/virtio_balloon.h | 3 ++-
mm/page_alloc.c | 43 +++++++++++++++++++++++++++++++++++++
5 files changed, 53 insertions(+), 31 deletions(-)
--
2.5.0
^ permalink raw reply
* [PATCH 1/2] calculate 'available' memory in the separate function
From: Denis V. Lunev @ 2016-02-16 15:50 UTC (permalink / raw)
Cc: Igor Redko, Michael S. Tsirkin, linux-kernel, virtualization,
Denis V. Lunev, Andrew Morton
In-Reply-To: <1455637852-7323-1-git-send-email-den@openvz.org>
From: Igor Redko <redkoi@virtuozzo.com>
Factor out calculation of the available memory counter into a separate
exportable function, in order to be able to use it in other parts of
the kernel.
In particular, it appears a relevant metric to report to the
hypervisor via virtio-balloon statistics interface (in a followup
patch).
Signed-off-by: Igor Redko <redkoi@virtuozzo.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael S. Tsirkin <mst@redhat.com>
CC: Andrew Morton <akpm@linux-foundation.org>
---
fs/proc/meminfo.c | 31 +------------------------------
include/linux/mm.h | 1 +
mm/page_alloc.c | 43 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 45 insertions(+), 30 deletions(-)
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
index df4661a..8372046 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -29,10 +29,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
unsigned long committed;
long cached;
long available;
- unsigned long pagecache;
- unsigned long wmark_low = 0;
unsigned long pages[NR_LRU_LISTS];
- struct zone *zone;
int lru;
/*
@@ -51,33 +48,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
for (lru = LRU_BASE; lru < NR_LRU_LISTS; lru++)
pages[lru] = global_page_state(NR_LRU_BASE + lru);
- for_each_zone(zone)
- wmark_low += zone->watermark[WMARK_LOW];
-
- /*
- * Estimate the amount of memory available for userspace allocations,
- * without causing swapping.
- */
- available = i.freeram - totalreserve_pages;
-
- /*
- * Not all the page cache can be freed, otherwise the system will
- * start swapping. Assume at least half of the page cache, or the
- * low watermark worth of cache, needs to stay.
- */
- pagecache = pages[LRU_ACTIVE_FILE] + pages[LRU_INACTIVE_FILE];
- pagecache -= min(pagecache / 2, wmark_low);
- available += pagecache;
-
- /*
- * Part of the reclaimable slab consists of items that are in use,
- * and cannot be freed. Cap this estimate at the low watermark.
- */
- available += global_page_state(NR_SLAB_RECLAIMABLE) -
- min(global_page_state(NR_SLAB_RECLAIMABLE) / 2, wmark_low);
-
- if (available < 0)
- available = 0;
+ available = si_mem_available();
/*
* Tagged format, for easy grepping and expansion.
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 516e149..a8c4144 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1862,6 +1862,7 @@ extern int __meminit init_per_zone_wmark_min(void);
extern void mem_init(void);
extern void __init mmap_init(void);
extern void show_mem(unsigned int flags);
+extern long si_mem_available(void);
extern void si_meminfo(struct sysinfo * val);
extern void si_meminfo_node(struct sysinfo *val, int nid);
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 838ca8bb..dae813c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3603,6 +3603,49 @@ static inline void show_node(struct zone *zone)
printk("Node %d ", zone_to_nid(zone));
}
+long si_mem_available(void)
+{
+ long available;
+ unsigned long pagecache;
+ unsigned long wmark_low = 0;
+ unsigned long pages[NR_LRU_LISTS];
+ struct zone *zone;
+ int lru;
+
+ for (lru = LRU_BASE; lru < NR_LRU_LISTS; lru++)
+ pages[lru] = global_page_state(NR_LRU_BASE + lru);
+
+ for_each_zone(zone)
+ wmark_low += zone->watermark[WMARK_LOW];
+
+ /*
+ * Estimate the amount of memory available for userspace allocations,
+ * without causing swapping.
+ */
+ available = global_page_state(NR_FREE_PAGES) - totalreserve_pages;
+
+ /*
+ * Not all the page cache can be freed, otherwise the system will
+ * start swapping. Assume at least half of the page cache, or the
+ * low watermark worth of cache, needs to stay.
+ */
+ pagecache = pages[LRU_ACTIVE_FILE] + pages[LRU_INACTIVE_FILE];
+ pagecache -= min(pagecache / 2, wmark_low);
+ available += pagecache;
+
+ /*
+ * Part of the reclaimable slab consists of items that are in use,
+ * and cannot be freed. Cap this estimate at the low watermark.
+ */
+ available += global_page_state(NR_SLAB_RECLAIMABLE) -
+ min(global_page_state(NR_SLAB_RECLAIMABLE) / 2, wmark_low);
+
+ if (available < 0)
+ available = 0;
+ return available;
+}
+EXPORT_SYMBOL_GPL(si_mem_available);
+
void si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
--
2.5.0
^ permalink raw reply related
* [PATCH 2/2] virtio_balloon: export 'available' memory to balloon statistics
From: Denis V. Lunev @ 2016-02-16 15:50 UTC (permalink / raw)
Cc: Igor Redko, Michael S. Tsirkin, linux-kernel, virtualization,
Denis V. Lunev, Andrew Morton
In-Reply-To: <1455637852-7323-1-git-send-email-den@openvz.org>
From: Igor Redko <redkoi@virtuozzo.com>
Add a new field, VIRTIO_BALLOON_S_AVAIL, to virtio_balloon memory
statistics protocol, corresponding to 'Available' in /proc/meminfo.
It indicates to the hypervisor how big the balloon can be inflated
without pushing the guest system to swap.
Signed-off-by: Igor Redko <redkoi@virtuozzo.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael S. Tsirkin <mst@redhat.com>
CC: Andrew Morton <akpm@linux-foundation.org>
---
drivers/virtio/virtio_balloon.c | 6 ++++++
include/uapi/linux/virtio_balloon.h | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 0c3691f..f2b77de 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -30,6 +30,7 @@
#include <linux/balloon_compaction.h>
#include <linux/oom.h>
#include <linux/wait.h>
+#include <linux/mm.h>
/*
* Balloon device works in 4K page units. So each page is pointed to by
@@ -229,10 +230,13 @@ static void update_balloon_stats(struct virtio_balloon *vb)
unsigned long events[NR_VM_EVENT_ITEMS];
struct sysinfo i;
int idx = 0;
+ long available;
all_vm_events(events);
si_meminfo(&i);
+ available = si_mem_available();
+
update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_IN,
pages_to_bytes(events[PSWPIN]));
update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_OUT,
@@ -243,6 +247,8 @@ static void update_balloon_stats(struct virtio_balloon *vb)
pages_to_bytes(i.freeram));
update_stat(vb, idx++, VIRTIO_BALLOON_S_MEMTOT,
pages_to_bytes(i.totalram));
+ update_stat(vb, idx++, VIRTIO_BALLOON_S_AVAIL,
+ pages_to_bytes(available));
}
/*
diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h
index d7f1cbc..343d7dd 100644
--- a/include/uapi/linux/virtio_balloon.h
+++ b/include/uapi/linux/virtio_balloon.h
@@ -51,7 +51,8 @@ struct virtio_balloon_config {
#define VIRTIO_BALLOON_S_MINFLT 3 /* Number of minor faults */
#define VIRTIO_BALLOON_S_MEMFREE 4 /* Total amount of free memory */
#define VIRTIO_BALLOON_S_MEMTOT 5 /* Total amount of memory */
-#define VIRTIO_BALLOON_S_NR 6
+#define VIRTIO_BALLOON_S_AVAIL 6 /* Available memory as in /proc */
+#define VIRTIO_BALLOON_S_NR 7
/*
* Memory statistics structure.
--
2.5.0
^ permalink raw reply related
* Re: [PATCH 11/16] drm/atmel-hldcd: removed optional dummy crtc mode_fixup function.
From: Boris Brezillon @ 2016-02-16 16:58 UTC (permalink / raw)
To: Carlos Palminha
Cc: nicolas.pitre, jianwei.wang.chn, alison.wang, airlied,
daniel.vetter, patrik.r.jakobsson, virtualization,
linux-renesas-soc, jani.nikula, dri-devel, benjamin.gaignard,
vincent.abriou, sudipm.mukherjee, laurent.pinchart
In-Reply-To: <e4bdb8552c245f8b73084b93da60460a00f7798c.1455630967.git.palminha@synopsys.com>
On Tue, 16 Feb 2016 14:19:06 +0000
Carlos Palminha <CARLOS.PALMINHA@synopsys.com> wrote:
> This patch set nukes all the dummy crtc mode_fixup implementations.
> (made on top of Daniel topic/drm-misc branch)
There's 2 typos in the subject line (s/hldcd/hlcdc/ and
s/removed/remove/), and you're removing an empty line after
atmel_hlcdc_crtc_create() definition (which is correct, but I'm not
sure it should be part of the same patch).
Otherwise it looks good to me.
Once you've fixed those 2 things, you can add my
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
>
> Signed-off-by: Carlos Palminha <palminha@synopsys.com>
> ---
> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> index 9863291..58c4f78 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> @@ -121,13 +121,6 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c)
> cfg);
> }
>
> -static bool atmel_hlcdc_crtc_mode_fixup(struct drm_crtc *crtc,
> - const struct drm_display_mode *mode,
> - struct drm_display_mode *adjusted_mode)
> -{
> - return true;
> -}
> -
> static void atmel_hlcdc_crtc_disable(struct drm_crtc *c)
> {
> struct drm_device *dev = c->dev;
> @@ -261,7 +254,6 @@ static void atmel_hlcdc_crtc_atomic_flush(struct drm_crtc *crtc,
> }
>
> static const struct drm_crtc_helper_funcs lcdc_crtc_helper_funcs = {
> - .mode_fixup = atmel_hlcdc_crtc_mode_fixup,
> .mode_set = drm_helper_crtc_mode_set,
> .mode_set_nofb = atmel_hlcdc_crtc_mode_set_nofb,
> .mode_set_base = drm_helper_crtc_mode_set_base,
> @@ -349,4 +341,3 @@ fail:
> atmel_hlcdc_crtc_destroy(&crtc->base);
> return ret;
> }
> -
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply
* Re: [PATCH 01/16] drm: fixes crct set_mode when crtc mode_fixup is null.
From: Sergei Shtylyov @ 2016-02-16 17:37 UTC (permalink / raw)
To: Carlos Palminha, airlied, dri-devel, daniel.vetter,
patrik.r.jakobsson, virtualization
Cc: nicolas.pitre, boris.brezillon, jianwei.wang.chn, jani.nikula,
alison.wang, linux-renesas-soc, laurent.pinchart,
benjamin.gaignard, vincent.abriou, sudipm.mukherjee
In-Reply-To: <9d41105dee6632b4bb50e9555f2196ac249b9fce.1455630967.git.palminha@synopsys.com>
Hello.
On 02/16/2016 05:10 PM, Carlos Palminha wrote:
> This patch set nukes all the dummy crtc mode_fixup implementations.
> (made on top of Daniel topic/drm-misc branch)
>
> Signed-off-by: Carlos Palminha <palminha@synopsys.com>
> ---
> drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> index e70d064..7539eea 100644
> --- a/drivers/gpu/drm/drm_crtc_helper.c
> +++ b/drivers/gpu/drm/drm_crtc_helper.c
> @@ -343,9 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
> }
> }
>
> - if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) {
> - DRM_DEBUG_KMS("CRTC fixup failed\n");
> - goto done;
> + if (crtc_funcs->mode_fixup) {
> + if (!(ret = crtc_funcs->mode_fixup(crtc, mode,
> + adjusted_mode))) {
You haven't run the patch thru scripts/checkpatch.pl, have you? :-)
(It curses on assignment inside the *if* expression.)
[...]
MBR, Sergei
^ permalink raw reply
* Re: [PATCH 01/16] drm: fixes crct set_mode when crtc mode_fixup is null.
From: Daniel Vetter @ 2016-02-16 19:39 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: nicolas.pitre, boris.brezillon, jianwei.wang.chn, airlied,
daniel.vetter, alison.wang, Carlos Palminha, dri-devel,
virtualization, linux-renesas-soc, jani.nikula,
patrik.r.jakobsson, benjamin.gaignard, vincent.abriou,
sudipm.mukherjee, laurent.pinchart
In-Reply-To: <56C35E59.8070805@cogentembedded.com>
On Tue, Feb 16, 2016 at 08:37:29PM +0300, Sergei Shtylyov wrote:
> Hello.
>
> On 02/16/2016 05:10 PM, Carlos Palminha wrote:
>
> >This patch set nukes all the dummy crtc mode_fixup implementations.
> >(made on top of Daniel topic/drm-misc branch)
> >
> >Signed-off-by: Carlos Palminha <palminha@synopsys.com>
> >---
> > drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++---
> > 1 file changed, 6 insertions(+), 3 deletions(-)
> >
> >diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> >index e70d064..7539eea 100644
> >--- a/drivers/gpu/drm/drm_crtc_helper.c
> >+++ b/drivers/gpu/drm/drm_crtc_helper.c
> >@@ -343,9 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
> > }
> > }
> >
> >- if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) {
> >- DRM_DEBUG_KMS("CRTC fixup failed\n");
> >- goto done;
> >+ if (crtc_funcs->mode_fixup) {
> >+ if (!(ret = crtc_funcs->mode_fixup(crtc, mode,
> >+ adjusted_mode))) {
>
> You haven't run the patch thru scripts/checkpatch.pl, have you? :-)
> (It curses on assignment inside the *if* expression.)
pre-existing, so checkpatch.pl doesn't get a vote ;-)
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply
* Re: [PATCH v7 0/9] virtio DMA API, yet again
From: Andy Lutomirski @ 2016-02-17 5:48 UTC (permalink / raw)
To: Andy Lutomirski
Cc: linux-s390, Joerg Roedel, KVM, Michael S. Tsirkin,
Benjamin Herrenschmidt, Stefano Stabellini, Sebastian Ott,
linux-kernel@vger.kernel.org, Christoph Hellwig,
Christian Borntraeger, David Vrabel,
xen-devel@lists.xenproject.org, sparclinux, Paolo Bonzini,
Linux Virtualization, David Woodhouse, David S. Miller,
Martin Schwidefsky
In-Reply-To: <cover.1454477782.git.luto@kernel.org>
On Tue, Feb 2, 2016 at 9:46 PM, Andy Lutomirski <luto@kernel.org> wrote:
> This switches virtio to use the DMA API on Xen and if requested by
> module option.
Michael, any update on this?
--Andy
^ permalink raw reply
* Re: [PATCH 11/16] drm/atmel-hldcd: removed optional dummy crtc mode_fixup function.
From: Carlos Palminha @ 2016-02-17 9:02 UTC (permalink / raw)
To: Boris Brezillon, Carlos Palminha, Daniel Vetter
Cc: nicolas.pitre, jianwei.wang.chn, alison.wang, airlied,
daniel.vetter, patrik.r.jakobsson, virtualization,
linux-renesas-soc, jani.nikula, dri-devel, benjamin.gaignard,
vincent.abriou, sudipm.mukherjee, laurent.pinchart
In-Reply-To: <20160216175856.32bbb579@bbrezillon>
Thanks Boris.
@Daniel, do you want me to resend this patch or will you fix it directly in mode-fixup git branch?
On 16-02-2016 16:58, Boris Brezillon wrote:
> On Tue, 16 Feb 2016 14:19:06 +0000
> Carlos Palminha <CARLOS.PALMINHA@synopsys.com> wrote:
>
>> This patch set nukes all the dummy crtc mode_fixup implementations.
>> (made on top of Daniel topic/drm-misc branch)
>
> There's 2 typos in the subject line (s/hldcd/hlcdc/ and
> s/removed/remove/), and you're removing an empty line after
> atmel_hlcdc_crtc_create() definition (which is correct, but I'm not
> sure it should be part of the same patch).
> Otherwise it looks good to me.
> Once you've fixed those 2 things, you can add my
>
> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
>
>>
>> Signed-off-by: Carlos Palminha <palminha@synopsys.com>
>> ---
>> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 9 ---------
>> 1 file changed, 9 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
>> index 9863291..58c4f78 100644
>> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
>> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
>> @@ -121,13 +121,6 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c)
>> cfg);
>> }
>>
>> -static bool atmel_hlcdc_crtc_mode_fixup(struct drm_crtc *crtc,
>> - const struct drm_display_mode *mode,
>> - struct drm_display_mode *adjusted_mode)
>> -{
>> - return true;
>> -}
>> -
>> static void atmel_hlcdc_crtc_disable(struct drm_crtc *c)
>> {
>> struct drm_device *dev = c->dev;
>> @@ -261,7 +254,6 @@ static void atmel_hlcdc_crtc_atomic_flush(struct drm_crtc *crtc,
>> }
>>
>> static const struct drm_crtc_helper_funcs lcdc_crtc_helper_funcs = {
>> - .mode_fixup = atmel_hlcdc_crtc_mode_fixup,
>> .mode_set = drm_helper_crtc_mode_set,
>> .mode_set_nofb = atmel_hlcdc_crtc_mode_set_nofb,
>> .mode_set_base = drm_helper_crtc_mode_set_base,
>> @@ -349,4 +341,3 @@ fail:
>> atmel_hlcdc_crtc_destroy(&crtc->base);
>> return ret;
>> }
>> -
>
>
^ permalink raw reply
* Re: [PATCH v7 0/9] virtio DMA API, yet again
From: Michael S. Tsirkin @ 2016-02-17 9:29 UTC (permalink / raw)
To: Andy Lutomirski
Cc: Joerg Roedel, KVM, linux-s390, Benjamin Herrenschmidt,
Stefano Stabellini, Sebastian Ott, linux-kernel@vger.kernel.org,
Christoph Hellwig, Christian Borntraeger, David Vrabel,
Andy Lutomirski, xen-devel@lists.xenproject.org, sparclinux,
Paolo Bonzini, Linux Virtualization, David Woodhouse,
David S. Miller, Martin Schwidefsky
In-Reply-To: <CALCETrXtcL18QnouuNQavDNPvSSf54KxRviGZC3yJD7jECTqcQ@mail.gmail.com>
On Tue, Feb 16, 2016 at 09:48:58PM -0800, Andy Lutomirski wrote:
> On Tue, Feb 2, 2016 at 9:46 PM, Andy Lutomirski <luto@kernel.org> wrote:
> > This switches virtio to use the DMA API on Xen and if requested by
> > module option.
>
> Michael, any update on this?
>
> --Andy
I was hoping for an explicit ack from David Woodhouse,
but I guess the informal "let's not hold this up"
that was sent on v5 will do.
I've queued this up for 4.6, thanks everyone!
--
MST
^ permalink raw reply
* Re: [PATCH v7 0/9] virtio DMA API, yet again
From: David Woodhouse @ 2016-02-17 9:42 UTC (permalink / raw)
To: Michael S. Tsirkin, Andy Lutomirski
Cc: Joerg Roedel, KVM, linux-s390, Benjamin Herrenschmidt,
Stefano Stabellini, Sebastian Ott, linux-kernel@vger.kernel.org,
Christoph Hellwig, Christian Borntraeger, David Vrabel,
Andy Lutomirski, xen-devel@lists.xenproject.org, sparclinux,
Paolo Bonzini, Linux Virtualization, David S. Miller,
Martin Schwidefsky
In-Reply-To: <20160217112747-mutt-send-email-mst@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 280 bytes --]
On Wed, 2016-02-17 at 11:29 +0200, Michael S. Tsirkin wrote:
>
> I was hoping for an explicit ack from David Woodhouse,
> but I guess the informal "let's not hold this up"
> that was sent on v5 will do.
Apologies; I was working under that assumption too.
--
dwmw2
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5691 bytes --]
[-- Attachment #2: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply
* Re: [PATCH 11/16] drm/atmel-hldcd: removed optional dummy crtc mode_fixup function.
From: Daniel Vetter @ 2016-02-17 13:08 UTC (permalink / raw)
To: Carlos Palminha
Cc: nicolas.pitre, Boris Brezillon, benjamin.gaignard,
jianwei.wang.chn, airlied, daniel.vetter, alison.wang,
patrik.r.jakobsson, virtualization, linux-renesas-soc,
jani.nikula, dri-devel, Daniel Vetter, vincent.abriou,
sudipm.mukherjee, laurent.pinchart
In-Reply-To: <56C43734.9050708@synopsys.com>
On Wed, Feb 17, 2016 at 09:02:44AM +0000, Carlos Palminha wrote:
> Thanks Boris.
>
> @Daniel, do you want me to resend this patch or will you fix it directly in mode-fixup git branch?
I can fix the typos, but I'm meh on the whitespace change ;-) Imo that
doesn't need a resend.
-Daniel
>
> On 16-02-2016 16:58, Boris Brezillon wrote:
> > On Tue, 16 Feb 2016 14:19:06 +0000
> > Carlos Palminha <CARLOS.PALMINHA@synopsys.com> wrote:
> >
> >> This patch set nukes all the dummy crtc mode_fixup implementations.
> >> (made on top of Daniel topic/drm-misc branch)
> >
> > There's 2 typos in the subject line (s/hldcd/hlcdc/ and
> > s/removed/remove/), and you're removing an empty line after
> > atmel_hlcdc_crtc_create() definition (which is correct, but I'm not
> > sure it should be part of the same patch).
> > Otherwise it looks good to me.
> > Once you've fixed those 2 things, you can add my
> >
> > Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> >
> >>
> >> Signed-off-by: Carlos Palminha <palminha@synopsys.com>
> >> ---
> >> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 9 ---------
> >> 1 file changed, 9 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> >> index 9863291..58c4f78 100644
> >> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> >> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> >> @@ -121,13 +121,6 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c)
> >> cfg);
> >> }
> >>
> >> -static bool atmel_hlcdc_crtc_mode_fixup(struct drm_crtc *crtc,
> >> - const struct drm_display_mode *mode,
> >> - struct drm_display_mode *adjusted_mode)
> >> -{
> >> - return true;
> >> -}
> >> -
> >> static void atmel_hlcdc_crtc_disable(struct drm_crtc *c)
> >> {
> >> struct drm_device *dev = c->dev;
> >> @@ -261,7 +254,6 @@ static void atmel_hlcdc_crtc_atomic_flush(struct drm_crtc *crtc,
> >> }
> >>
> >> static const struct drm_crtc_helper_funcs lcdc_crtc_helper_funcs = {
> >> - .mode_fixup = atmel_hlcdc_crtc_mode_fixup,
> >> .mode_set = drm_helper_crtc_mode_set,
> >> .mode_set_nofb = atmel_hlcdc_crtc_mode_set_nofb,
> >> .mode_set_base = drm_helper_crtc_mode_set_base,
> >> @@ -349,4 +341,3 @@ fail:
> >> atmel_hlcdc_crtc_destroy(&crtc->base);
> >> return ret;
> >> }
> >> -
> >
> >
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox