Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Tue, 2014-11-25 at 21:14 +, Luis de Bethencourt wrote: > On Tue, Nov 25, 2014 at 01:00:07PM -0800, Joe Perches wrote: > > In the future, you might consider being more > > comprehensive with your patches. > > Wasn't sure about the scope of the style fixing > patches. I've been reading Kernel Newbies and > this looked like a good way to start > contributing. Good to know more exhaustive > changes are welcome. > > > > This code could be neatened a bit by: > > > > o using another set of logging macros > > o removing the unnecessary ftrace like logging > > o realigning arguments > > Great ideas. > Should this have been all included in one patch, > or each as part of a series with the previous > one? > Want to take the opportunity to learn about the > process. Hello again Luis. I think the suggestion I posted here is suitable for a single change. Ideally, you'd make individual patches each with a single "type" of change. There is a script I posted a while back that groups various checkpatch "types" together and makes it a bit easier to do cleanup style patches. https://lkml.org/lkml/2014/7/11/794 But don't just use checkpatch as the sole decider of what's appropriate to fix or neaten. checkpatch is a stupid, brainless little script. So is the automation script that uses checkpatch. For instance, checkpatch would not have suggested creating and using another logging macro. Please use your own taste to best figure out what to fix and how. Using checkpatch to get familiar with kernel development is fine and all, but fixing actual defects and submitting new code is way more useful. cheers, welcome, Joe ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Drivers:staging:speakup: Fixed checkpatch warning
Fixed the checkpatch warning: WARNING: simple_strtoul is obsolete, use kstrtoul instead Signed-off-by: Athira Lekshmi C V --- drivers/staging/speakup/varhandlers.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c index 1b0d1c0..00fd67e 100644 --- a/drivers/staging/speakup/varhandlers.c +++ b/drivers/staging/speakup/varhandlers.c @@ -324,7 +324,7 @@ char *spk_s2uchar(char *start, char *dest) { int val = 0; - val = simple_strtoul(skip_spaces(start), &start, 10); + val = kstrtoul(skip_spaces(start), &start, 10); if (*start == ',') start++; *dest = (u_char)val; -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:staging:speakup: Fixed checkpatch warning
On Wed, Nov 26, 2014 at 12:14 PM, Athira Lekshmi C V wrote: > Fixed the checkpatch warning: > WARNING: simple_strtoul is obsolete, use kstrtoul instead > > Signed-off-by: Athira Lekshmi C V > --- > drivers/staging/speakup/varhandlers.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/speakup/varhandlers.c > b/drivers/staging/speakup/varhandlers.c > index 1b0d1c0..00fd67e 100644 > --- a/drivers/staging/speakup/varhandlers.c > +++ b/drivers/staging/speakup/varhandlers.c > @@ -324,7 +324,7 @@ char *spk_s2uchar(char *start, char *dest) > { > int val = 0; > > - val = simple_strtoul(skip_spaces(start), &start, 10); > + val = kstrtoul(skip_spaces(start), &start, 10); > if (*start == ',') > start++; > *dest = (u_char)val; NACK. Please test your patch or at least read the function signature kstrtoul(). -- Thanks, //richard ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Drivers:staging:comedi:drivers: Fixed checkpatch warning
Fixed the checkpatch warning: WARNING: please, no space before tabs Signed-off-by: Athira Lekshmi C V --- drivers/staging/comedi/drivers/ni_at_a2150.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c index 69e543a..bff4852 100644 --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c @@ -108,7 +108,7 @@ TRIG_WAKE_EOS #define IRQ_LVL_BITS(x) (((x) & 0xf) << 4) /* sets irq level */ #define FIFO_INTR_EN_BIT 0x100 /* enable fifo interrupts */ #define FIFO_INTR_FHF_BIT0x200 /* interrupt fifo half full */ -#define DMA_INTR_EN_BIT 0x800 /* enable interrupt on dma terminal count */ +#define DMA_INTR_EN_BIT 0x800 /* enable interrupt on dma terminal count */ #define DMA_DEM_EN_BIT 0x1000 /* enables demand mode dma */ #define I8253_BASE_REG 0x14 #define I8253_MODE_REG 0x17 -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Drivers:staging:octeon: Fixed checkpatch warning
Fixed the checkpatch warning: WARNING: Missing a blank line after declarations Signed-off-by: Athira Lekshmi C V --- drivers/staging/octeon/ethernet-rx.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index 44e372f..f80d509 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c @@ -84,6 +84,7 @@ static int cvm_irq_cpu; static void cvm_oct_enable_napi(void *_) { int cpu = smp_processor_id(); + napi_schedule(&cvm_oct_napi[cpu].napi); } @@ -169,6 +170,7 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work) int interface = cvmx_helper_get_interface_num(work->ipprt); int index = cvmx_helper_get_interface_index_num(work->ipprt); union cvmx_gmxx_rxx_frm_ctl gmxx_rxx_frm_ctl; + gmxx_rxx_frm_ctl.u64 = cvmx_read_csr(CVMX_GMXX_RXX_FRM_CTL(index, interface)); if (gmxx_rxx_frm_ctl.s.pre_chk == 0) { @@ -272,6 +274,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) did_work_request = 0; if (work == NULL) { union cvmx_pow_wq_int wq_int; + wq_int.u64 = 0; wq_int.s.iq_dis = 1 << pow_receive_group; wq_int.s.wq_int = 1 << pow_receive_group; @@ -294,8 +297,10 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) * CPU. */ union cvmx_pow_wq_int_cntx counts; + int backlog; int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores); + counts.u64 = cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group)); backlog = counts.s.iq_cnt + counts.s.ds_cnt; if (backlog > budget * cores_in_use && napi != NULL) -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:staging:octeon: Fixed checkpatch warning
On Wed, Nov 26, 2014 at 05:17:48PM +0530, Athira Lekshmi C V wrote: > @@ -294,8 +297,10 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, > int budget) >* CPU. >*/ > union cvmx_pow_wq_int_cntx counts; > + Don't put a blank here. > int backlog; > int cores_in_use = core_state.baseline_cores - > atomic_read(&core_state.available_cores); > + > counts.u64 = > cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group)); > backlog = counts.s.iq_cnt + counts.s.ds_cnt; regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Drivers:staging:octeon: Fixed checkpatch warning
Fixed the checkpatch warning: WARNING: Missing a blank line after declarations Signed-off-by: Athira Lekshmi C V --- drivers/staging/octeon/ethernet-rx.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index 44e372f..a7ff01c 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c @@ -84,6 +84,7 @@ static int cvm_irq_cpu; static void cvm_oct_enable_napi(void *_) { int cpu = smp_processor_id(); + napi_schedule(&cvm_oct_napi[cpu].napi); } @@ -296,6 +297,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) union cvmx_pow_wq_int_cntx counts; int backlog; int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores); + counts.u64 = cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group)); backlog = counts.s.iq_cnt + counts.s.ds_cnt; if (backlog > budget * cores_in_use && napi != NULL) -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: lustre: fix pointer declarations
On Tue, Nov 25, 2014 at 09:44:21PM +0100, Zahari Doychev wrote: > This patch fixes pointer declarations from void * to void __user * in order > to remove some sparse warnings. _Are_ those userland addresses, though? Quick grep shows that in the only caller of lnet_copy_iov2flat() we have something called ibmsg passed as the second argument *AND* *RIGHT* *BEFORE* *THAT* *CALL* *WE* *HAVE* ibmsg = tx->tx_msg; ibmsg->ibm_u.immediate.ibim_hdr = *hdr; Go ahead, explain how does that manage to work if ibmsg is a userland pointer. Either you have discovered an exploitable hole (direct store to userland address), or it's not a userland pointer, after all. Al, sick and tired of the "remove some warnings" as the sole rationale for patches, without even an attempt to figure out what those warnings are about. Magic box makes noises, magic box must be appeased... ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 0/12] dw-hdmi: convert imx hdmi to bridge/dw_hdmi
We found Freescale imx6 and Rockchip rk3288 and Ingenic JZ4780 (Xburst/MIPS) use the interface compatible Designware HDMI IP, but they also have some lightly differences, such as phy pll configuration, register width(imx hdmi register is one byte, but rk3288 is 4 bytes width and can only be accessed by word), 4K support(imx6 doesn't support 4k, but rk3288 does), and HDMI2.0 support. To reuse the imx-hdmi driver, we make this patch set: (1): fix some CodingStyle warning to make checkpatch happy (2): convert imx-hdmi to drm_bridge (3): split platform specific code (4): move imx-hdmi to bridge/dw_hdmi (5): extend dw_hdmi.c to support rk3288 hdmi (6): add rockchip rk3288 platform specific code dw_hdmi-rockchip.c Changes in v13: - patch against drm-next - split phy configuration from patch#4 Changes in v12: - refactor of_node_put(ddc_node) - squash patch - add comment for the depend on patch Changes in v11: - squash patch - split form patch Changes in v10: - split generic dw_hdmi.c improvements from patch#11 (add rk3288 support) - add more display mode support mpll configuration for rk3288 Changes in v9: - move some phy configuration to platform driver Changes in v8: - correct some spelling mistake - modify ddc-i2c-bus and interrupt description - Add documentation for rockchip dw hdmi Changes in v7: - remove unused variables from structure dw_hdmi - remove a wrong modification - add copyrights for dw_hdmi-imx.c Changes in v6: - rearrange the patch order - refactor register access without reg_shift Changes in v5: - refactor reg-io-width Changes in v4: - fix checkpatch CHECK - defer probe ddc i2c adapter Changes in v3: - split multi-register access to one indepent patch Andy Yan (12): drm: imx: imx-hdmi: make checkpatch happy drm: imx: imx-hdmi: return defer if can't get ddc i2c adapter drm: imx: imx-hdmi: convert imx-hdmi to drm_bridge mode drm: imx: imx-hdmi: split phy configuration to platform driver drm: imx: imx-hdmi: move imx-hdmi to bridge/dw_hdmi dt-bindings: add document for dw_hdmi drm: bridge/dw_hdmi: add support for multi-byte register width access drm: bridge/dw_hdmi: add mode_valid support drm: bridge/dw_hdmi: clear i2cmphy_stat0 reg in hdmi_phy_wait_i2c_done drm: bridge/dw_hdmi: add function dw_hdmi_phy_enable_spare dt-bindings: Add documentation for rockchip dw hdmi drm: bridge/dw_hdmi: add rockchip rk3288 support .../devicetree/bindings/drm/bridge/dw_hdmi.txt | 40 ++ .../devicetree/bindings/video/dw_hdmi-rockchip.txt | 43 ++ drivers/gpu/drm/bridge/Kconfig | 5 + drivers/gpu/drm/bridge/Makefile| 1 + .../gpu/drm/{imx/imx-hdmi.c => bridge/dw_hdmi.c} | 757 + .../gpu/drm/{imx/imx-hdmi.h => bridge/dw_hdmi.h} | 4 +- drivers/gpu/drm/imx/Kconfig| 1 + drivers/gpu/drm/imx/Makefile | 2 +- drivers/gpu/drm/imx/dw_hdmi-imx.c | 273 drivers/gpu/drm/rockchip/Kconfig | 10 + drivers/gpu/drm/rockchip/Makefile | 2 +- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c| 355 ++ include/drm/bridge/dw_hdmi.h | 60 ++ 13 files changed, 1132 insertions(+), 421 deletions(-) create mode 100644 Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt create mode 100644 Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt rename drivers/gpu/drm/{imx/imx-hdmi.c => bridge/dw_hdmi.c} (71%) rename drivers/gpu/drm/{imx/imx-hdmi.h => bridge/dw_hdmi.h} (99%) create mode 100644 drivers/gpu/drm/imx/dw_hdmi-imx.c create mode 100644 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c create mode 100644 include/drm/bridge/dw_hdmi.h -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 01/12] drm: imx: imx-hdmi: make checkpatch happy
CHECK: Alignment should match open parenthesis + if ((hdmi->vic == 10) || (hdmi->vic == 11) || + (hdmi->vic == 12) || (hdmi->vic == 13) || CHECK: braces {} should be used on all arms of this statement + if (hdmi->hdmi_data.video_mode.mdvi) [...] + else { [...] Signed-off-by: Andy Yan Reviewed-by: Daniel Kurtz --- Changes in v13: - patch against drm-next Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: - rearrange the patch order Changes in v5: None Changes in v4: - fix checkpatch CHECK Changes in v3: None drivers/gpu/drm/imx/imx-hdmi.c | 97 +- 1 file changed, 48 insertions(+), 49 deletions(-) diff --git a/drivers/gpu/drm/imx/imx-hdmi.c b/drivers/gpu/drm/imx/imx-hdmi.c index aaec6b2..79daec4 100644 --- a/drivers/gpu/drm/imx/imx-hdmi.c +++ b/drivers/gpu/drm/imx/imx-hdmi.c @@ -163,7 +163,7 @@ static void hdmi_modb(struct imx_hdmi *hdmi, u8 data, u8 mask, unsigned reg) } static void hdmi_mask_writeb(struct imx_hdmi *hdmi, u8 data, unsigned int reg, - u8 shift, u8 mask) +u8 shift, u8 mask) { hdmi_modb(hdmi, data << shift, mask, reg); } @@ -327,7 +327,7 @@ static unsigned int hdmi_compute_cts(unsigned int freq, unsigned long pixel_clk, } static void hdmi_set_clk_regenerator(struct imx_hdmi *hdmi, - unsigned long pixel_clk) +unsigned long pixel_clk) { unsigned int clk_n, clk_cts; @@ -338,7 +338,7 @@ static void hdmi_set_clk_regenerator(struct imx_hdmi *hdmi, if (!clk_cts) { dev_dbg(hdmi->dev, "%s: pixel clock not supported: %lu\n", -__func__, pixel_clk); + __func__, pixel_clk); return; } @@ -477,13 +477,11 @@ static void imx_hdmi_update_csc_coeffs(struct imx_hdmi *hdmi) u16 coeff_b = (*csc_coeff)[1][i]; u16 coeff_c = (*csc_coeff)[2][i]; - hdmi_writeb(hdmi, coeff_a & 0xff, - HDMI_CSC_COEF_A1_LSB + i * 2); + hdmi_writeb(hdmi, coeff_a & 0xff, HDMI_CSC_COEF_A1_LSB + i * 2); hdmi_writeb(hdmi, coeff_a >> 8, HDMI_CSC_COEF_A1_MSB + i * 2); hdmi_writeb(hdmi, coeff_b & 0xff, HDMI_CSC_COEF_B1_LSB + i * 2); hdmi_writeb(hdmi, coeff_b >> 8, HDMI_CSC_COEF_B1_MSB + i * 2); - hdmi_writeb(hdmi, coeff_c & 0xff, - HDMI_CSC_COEF_C1_LSB + i * 2); + hdmi_writeb(hdmi, coeff_c & 0xff, HDMI_CSC_COEF_C1_LSB + i * 2); hdmi_writeb(hdmi, coeff_c >> 8, HDMI_CSC_COEF_C1_MSB + i * 2); } @@ -535,21 +533,22 @@ static void hdmi_video_packetize(struct imx_hdmi *hdmi) struct hdmi_data_info *hdmi_data = &hdmi->hdmi_data; u8 val, vp_conf; - if (hdmi_data->enc_out_format == RGB - || hdmi_data->enc_out_format == YCBCR444) { - if (!hdmi_data->enc_color_depth) + if (hdmi_data->enc_out_format == RGB || + hdmi_data->enc_out_format == YCBCR444) { + if (!hdmi_data->enc_color_depth) { output_select = HDMI_VP_CONF_OUTPUT_SELECTOR_BYPASS; - else if (hdmi_data->enc_color_depth == 8) { + } else if (hdmi_data->enc_color_depth == 8) { color_depth = 4; output_select = HDMI_VP_CONF_OUTPUT_SELECTOR_BYPASS; - } else if (hdmi_data->enc_color_depth == 10) + } else if (hdmi_data->enc_color_depth == 10) { color_depth = 5; - else if (hdmi_data->enc_color_depth == 12) + } else if (hdmi_data->enc_color_depth == 12) { color_depth = 6; - else if (hdmi_data->enc_color_depth == 16) + } else if (hdmi_data->enc_color_depth == 16) { color_depth = 7; - else + } else { return; + } } else if (hdmi_data->enc_out_format == YCBCR422_8BITS) { if (!hdmi_data->enc_color_depth || hdmi_data->enc_color_depth == 8) @@ -561,8 +560,9 @@ static void hdmi_video_packetize(struct imx_hdmi *hdmi) else return; output_select = HDMI_VP_CONF_OUTPUT_SELECTOR_YCC422; - } else + } else { return; + } /* set the packetizer registers */ val = ((color_depth << HDMI_VP_PR_CD_COLOR_DEPTH_OFFSET) & @@ -623,34 +623,34 @@ static void hdmi_video_packetize(struct imx_hdmi *hdmi) } static inline void hdmi_phy_test_clear(struct imx_hdmi *hdmi, - unsigned char bit) + unsigned char bit) { hdmi_mo
[PATCH v13 02/12] drm: imx: imx-hdmi: return defer if can't get ddc i2c adapter
drm driver may probe before the i2c bus, so the driver should defer probing until it is available Signed-off-by: Andy Yan Reviewed-by: Daniel Kurtz --- Changes in v13: None Changes in v12: - refactor of_node_put(ddc_node) Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: - defer probe ddc i2c adapter Changes in v3: None drivers/gpu/drm/imx/imx-hdmi.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/imx/imx-hdmi.c b/drivers/gpu/drm/imx/imx-hdmi.c index 79daec4..8029a07 100644 --- a/drivers/gpu/drm/imx/imx-hdmi.c +++ b/drivers/gpu/drm/imx/imx-hdmi.c @@ -1611,10 +1611,12 @@ static int imx_hdmi_bind(struct device *dev, struct device *master, void *data) ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0); if (ddc_node) { hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node); - if (!hdmi->ddc) + of_node_put(ddc_node); + if (!hdmi->ddc) { dev_dbg(hdmi->dev, "failed to read ddc node\n"); + return -EPROBE_DEFER; + } - of_node_put(ddc_node); } else { dev_dbg(hdmi->dev, "no ddc property found\n"); } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 03/12] drm: imx: imx-hdmi: convert imx-hdmi to drm_bridge mode
IMX6 and Rockchip RK3288 and JZ4780 (Ingenic Xburst/MIPS) use the interface compatible Designware HDMI IP, but they also have some lightly differences, such as phy pll configuration, register width, 4K support, clk useage, and the crtc mux configuration is also platform specific. To reuse the imx hdmi driver, convert it to drm_bridge handle encoder in imx-hdmi_pltfm.c, as most of the encoder operation are platform specific such as crtc select and panel format set Signed-off-by: Andy Yan Signed-off-by: Yakir Yang --- Changes in v13: - split platform specific phy configuration Changes in v12: - squash patch Changes in v11: - squash patch Changes in v10: - split generic dw_hdmi.c improvements from patch#11 (add rk3288 support) Changes in v9: None Changes in v8: None Changes in v7: - remove unused variables from structure dw_hdmi - remove a wrong modification - add copyrights for dw_hdmi-imx.c Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/imx/Makefile | 2 +- drivers/gpu/drm/imx/imx-hdmi.c | 297 --- drivers/gpu/drm/imx/imx-hdmi.h | 14 ++ drivers/gpu/drm/imx/imx-hdmi_pltfm.c | 218 + 4 files changed, 331 insertions(+), 200 deletions(-) create mode 100644 drivers/gpu/drm/imx/imx-hdmi_pltfm.c diff --git a/drivers/gpu/drm/imx/Makefile b/drivers/gpu/drm/imx/Makefile index 582c438..63cf56a 100644 --- a/drivers/gpu/drm/imx/Makefile +++ b/drivers/gpu/drm/imx/Makefile @@ -9,4 +9,4 @@ obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o imx-ipuv3-crtc-objs := ipuv3-crtc.o ipuv3-plane.o obj-$(CONFIG_DRM_IMX_IPUV3)+= imx-ipuv3-crtc.o -obj-$(CONFIG_DRM_IMX_HDMI) += imx-hdmi.o +obj-$(CONFIG_DRM_IMX_HDMI) += imx-hdmi.o imx-hdmi_pltfm.o diff --git a/drivers/gpu/drm/imx/imx-hdmi.c b/drivers/gpu/drm/imx/imx-hdmi.c index 8029a07..4c3047f 100644 --- a/drivers/gpu/drm/imx/imx-hdmi.c +++ b/drivers/gpu/drm/imx/imx-hdmi.c @@ -12,22 +12,17 @@ * Copyright (C) 2010, Guennadi Liakhovetski */ -#include #include #include #include -#include #include -#include -#include -#include #include +#include #include #include #include #include -#include #include "imx-hdmi.h" #include "imx-drm.h" @@ -54,11 +49,6 @@ enum hdmi_datamap { YCbCr422_12B = 0x12, }; -enum imx_hdmi_devtype { - IMX6Q_HDMI, - IMX6DL_HDMI, -}; - static const u16 csc_coeff_default[3][4] = { { 0x2000, 0x, 0x, 0x }, { 0x, 0x2000, 0x, 0x }, @@ -113,14 +103,14 @@ struct hdmi_data_info { struct imx_hdmi { struct drm_connector connector; - struct drm_encoder encoder; + struct drm_encoder *encoder; + struct drm_bridge *bridge; enum imx_hdmi_devtype dev_type; struct device *dev; - struct clk *isfr_clk; - struct clk *iahb_clk; struct hdmi_data_info hdmi_data; + const struct imx_hdmi_plat_data *plat_data; int vic; u8 edid[HDMI_EDID_LEN]; @@ -137,13 +127,6 @@ struct imx_hdmi { int ratio; }; -static void imx_hdmi_set_ipu_di_mux(struct imx_hdmi *hdmi, int ipu_di) -{ - regmap_update_bits(hdmi->regmap, IOMUXC_GPR3, - IMX6Q_GPR3_HDMI_MUX_CTL_MASK, - ipu_di << IMX6Q_GPR3_HDMI_MUX_CTL_SHIFT); -} - static inline void hdmi_writeb(struct imx_hdmi *hdmi, u8 val, int offset) { writeb(val, hdmi->regs + offset); @@ -1371,6 +1354,50 @@ static void imx_hdmi_poweroff(struct imx_hdmi *hdmi) imx_hdmi_phy_disable(hdmi); } +static void imx_hdmi_bridge_mode_set(struct drm_bridge *bridge, +struct drm_display_mode *mode, +struct drm_display_mode *adjusted_mode) +{ + struct imx_hdmi *hdmi = bridge->driver_private; + + imx_hdmi_setup(hdmi, mode); + + /* Store the display mode for plugin/DKMS poweron events */ + memcpy(&hdmi->previous_mode, mode, sizeof(hdmi->previous_mode)); +} + +static bool imx_hdmi_bridge_mode_fixup(struct drm_bridge *bridge, + const struct drm_display_mode *mode, + struct drm_display_mode *adjusted_mode) +{ + return true; +} + +static void imx_hdmi_bridge_disable(struct drm_bridge *bridge) +{ + struct imx_hdmi *hdmi = bridge->driver_private; + + imx_hdmi_poweroff(hdmi); +} + +static void imx_hdmi_bridge_enable(struct drm_bridge *bridge) +{ + struct imx_hdmi *hdmi = bridge->driver_private; + + imx_hdmi_poweron(hdmi); +} + +static void imx_hdmi_bridge_destroy(struct drm_bridge *bridge) +{ + drm_bridge_cleanup(bridge); + kfree(bridge); +} + +static void imx_hdmi_bridge_nope(struct drm_bridge *bridge) +{ + /* do nothing */ +} + static enum drm_connector_status imx_hdmi_connector_detect(struct drm_connector *conn
[PATCH v13 04/12] drm: imx: imx-hdmi: split phy configuration to platform driver
hdmi phy configuration is platform specific, which can be adusted according to the board to get the best SI Signed-off-by: Andy Yan --- Changes in v13: - split phy configuration from patch#4 Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/imx/imx-hdmi.c | 85 +++- drivers/gpu/drm/imx/imx-hdmi.h | 29 drivers/gpu/drm/imx/imx-hdmi_pltfm.c | 57 3 files changed, 101 insertions(+), 70 deletions(-) diff --git a/drivers/gpu/drm/imx/imx-hdmi.c b/drivers/gpu/drm/imx/imx-hdmi.c index 4c3047f..9503728 100644 --- a/drivers/gpu/drm/imx/imx-hdmi.c +++ b/drivers/gpu/drm/imx/imx-hdmi.c @@ -711,76 +711,14 @@ static void imx_hdmi_phy_sel_interface_control(struct imx_hdmi *hdmi, u8 enable) HDMI_PHY_CONF0_SELDIPIF_MASK); } -enum { - RES_8, - RES_10, - RES_12, - RES_MAX, -}; - -struct mpll_config { - unsigned long mpixelclock; - struct { - u16 cpce; - u16 gmp; - } res[RES_MAX]; -}; - -static const struct mpll_config mpll_config[] = { - { - 4525, { - { 0x01e0, 0x }, - { 0x21e1, 0x }, - { 0x41e2, 0x } - }, - }, { - 9250, { - { 0x0140, 0x0005 }, - { 0x2141, 0x0005 }, - { 0x4142, 0x0005 }, - }, - }, { - 14850, { - { 0x00a0, 0x000a }, - { 0x20a1, 0x000a }, - { 0x40a2, 0x000a }, - }, - }, { - ~0UL, { - { 0x00a0, 0x000a }, - { 0x2001, 0x000f }, - { 0x4002, 0x000f }, - }, - } -}; - -struct curr_ctrl { - unsigned long mpixelclock; - u16 curr[RES_MAX]; -}; - -static const struct curr_ctrl curr_ctrl[] = { - /* pixelclk bpp8bpp10 bpp12 */ - { -5400, { 0x091c, 0x091c, 0x06dc }, - }, { -5840, { 0x091c, 0x06dc, 0x06dc }, - }, { -7200, { 0x06dc, 0x06dc, 0x091c }, - }, { -7425, { 0x06dc, 0x0b5c, 0x091c }, - }, { - 11880, { 0x091c, 0x091c, 0x06dc }, - }, { - 21600, { 0x06dc, 0x0b5c, 0x091c }, - } -}; - static int hdmi_phy_configure(struct imx_hdmi *hdmi, unsigned char prep, unsigned char res, int cscon) { unsigned res_idx, i; u8 val, msec; + const struct mpll_config *mpll_config = hdmi->plat_data->mpll_cfg; + const struct curr_ctrl *curr_ctrl = hdmi->plat_data->cur_ctr; + const struct sym_term *sym_term = hdmi->plat_data->sym_term; if (prep) return -EINVAL; @@ -826,7 +764,7 @@ static int hdmi_phy_configure(struct imx_hdmi *hdmi, unsigned char prep, hdmi_phy_test_clear(hdmi, 0); /* PLL/MPLL Cfg - always match on final entry */ - for (i = 0; i < ARRAY_SIZE(mpll_config) - 1; i++) + for (i = 0; mpll_config[i].mpixelclock != (~0UL); i++) if (hdmi->hdmi_data.video_mode.mpixelclock <= mpll_config[i].mpixelclock) break; @@ -834,12 +772,12 @@ static int hdmi_phy_configure(struct imx_hdmi *hdmi, unsigned char prep, hdmi_phy_i2c_write(hdmi, mpll_config[i].res[res_idx].cpce, 0x06); hdmi_phy_i2c_write(hdmi, mpll_config[i].res[res_idx].gmp, 0x15); - for (i = 0; i < ARRAY_SIZE(curr_ctrl); i++) + for (i = 0; curr_ctrl[i].mpixelclock != (~0UL); i++) if (hdmi->hdmi_data.video_mode.mpixelclock <= curr_ctrl[i].mpixelclock) break; - if (i >= ARRAY_SIZE(curr_ctrl)) { + if (curr_ctrl[i].mpixelclock == (~0UL)) { dev_err(hdmi->dev, "Pixel clock %d - unsupported by HDMI\n", hdmi->hdmi_data.video_mode.mpixelclock); return -EINVAL; @@ -850,10 +788,17 @@ static int hdmi_phy_configure(struct imx_hdmi *hdmi, unsigned char prep, hdmi_phy_i2c_write(hdmi, 0x, 0x13); /* PLLPHBYCTRL */ hdmi_phy_i2c_write(hdmi, 0x0006, 0x17); + + for (i = 0; sym_term[i].mpixelclock != (~0UL); i++) + if (hdmi->hdmi_data.video_mode.mpixelclock <= + sym_term[i].mpixelclock) + break; + /* RESISTANCE TERM 133Ohm Cfg */ - hdmi_phy_i2c_write(hdmi, 0x0005, 0x19); /* TXTERM */ + hdmi_phy_i2c_write(hdmi, sym_term[i].term, 0x19); /* TXTERM */ /* PREEMP Cgf 0.00 */ - hdmi_phy_i2c_write(hd
[PATCH v13 05/12] drm: imx: imx-hdmi: move imx-hdmi to bridge/dw_hdmi
the original imx hdmi driver is under drm/imx/, which depends on imx-drm, so move the imx hdmi driver out to drm/bridge and rename it to dw_hdmi Signed-off-by: Andy Yan --- Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/bridge/Kconfig | 5 + drivers/gpu/drm/bridge/Makefile| 1 + .../gpu/drm/{imx/imx-hdmi.c => bridge/dw_hdmi.c} | 270 ++--- .../gpu/drm/{imx/imx-hdmi.h => bridge/dw_hdmi.h} | 42 drivers/gpu/drm/imx/Kconfig| 1 + drivers/gpu/drm/imx/Makefile | 2 +- .../drm/imx/{imx-hdmi_pltfm.c => dw_hdmi-imx.c}| 118 + include/drm/bridge/dw_hdmi.h | 57 + 8 files changed, 258 insertions(+), 238 deletions(-) rename drivers/gpu/drm/{imx/imx-hdmi.c => bridge/dw_hdmi.c} (84%) rename drivers/gpu/drm/{imx/imx-hdmi.h => bridge/dw_hdmi.h} (98%) rename drivers/gpu/drm/imx/{imx-hdmi_pltfm.c => dw_hdmi-imx.c} (60%) create mode 100644 include/drm/bridge/dw_hdmi.h diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 884923f..26162ef 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -3,3 +3,8 @@ config DRM_PTN3460 depends on DRM select DRM_KMS_HELPER ---help--- + +config DRM_DW_HDMI + bool "Synopsys DesignWare High-Definition Multimedia Interface" + depends on DRM + select DRM_KMS_HELPER diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index b4733e1..d8a8cfd 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -1,3 +1,4 @@ ccflags-y := -Iinclude/drm obj-$(CONFIG_DRM_PTN3460) += ptn3460.o +obj-$(CONFIG_DRM_DW_HDMI) += dw_hdmi.o diff --git a/drivers/gpu/drm/imx/imx-hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c similarity index 84% rename from drivers/gpu/drm/imx/imx-hdmi.c rename to drivers/gpu/drm/bridge/dw_hdmi.c index 9503728..a53bf63 100644 --- a/drivers/gpu/drm/imx/imx-hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -6,12 +6,11 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * SH-Mobile High-Definition Multimedia Interface (HDMI) driver - * for SLISHDMI13T and SLIPHDMIT IP cores + * Designware High-Definition Multimedia Interface (HDMI) driver * * Copyright (C) 2010, Guennadi Liakhovetski */ - +#include #include #include #include @@ -23,9 +22,9 @@ #include #include #include +#include -#include "imx-hdmi.h" -#include "imx-drm.h" +#include "dw_hdmi.h" #define HDMI_EDID_LEN 512 @@ -101,16 +100,17 @@ struct hdmi_data_info { struct hdmi_vmode video_mode; }; -struct imx_hdmi { +struct dw_hdmi { struct drm_connector connector; struct drm_encoder *encoder; struct drm_bridge *bridge; - enum imx_hdmi_devtype dev_type; + enum dw_hdmi_devtype dev_type; struct device *dev; struct hdmi_data_info hdmi_data; - const struct imx_hdmi_plat_data *plat_data; + const struct dw_hdmi_plat_data *plat_data; + int vic; u8 edid[HDMI_EDID_LEN]; @@ -127,17 +127,17 @@ struct imx_hdmi { int ratio; }; -static inline void hdmi_writeb(struct imx_hdmi *hdmi, u8 val, int offset) +static inline void hdmi_writeb(struct dw_hdmi *hdmi, u8 val, int offset) { writeb(val, hdmi->regs + offset); } -static inline u8 hdmi_readb(struct imx_hdmi *hdmi, int offset) +static inline u8 hdmi_readb(struct dw_hdmi *hdmi, int offset) { return readb(hdmi->regs + offset); } -static void hdmi_modb(struct imx_hdmi *hdmi, u8 data, u8 mask, unsigned reg) +static void hdmi_modb(struct dw_hdmi *hdmi, u8 data, u8 mask, unsigned reg) { u8 val = hdmi_readb(hdmi, reg) & ~mask; @@ -145,13 +145,13 @@ static void hdmi_modb(struct imx_hdmi *hdmi, u8 data, u8 mask, unsigned reg) hdmi_writeb(hdmi, val, reg); } -static void hdmi_mask_writeb(struct imx_hdmi *hdmi, u8 data, unsigned int reg, +static void hdmi_mask_writeb(struct dw_hdmi *hdmi, u8 data, unsigned int reg, u8 shift, u8 mask) { hdmi_modb(hdmi, data << shift, mask, reg); } -static void hdmi_set_clock_regenerator_n(struct imx_hdmi *hdmi, +static void hdmi_set_clock_regenerator_n(struct dw_hdmi *hdmi, unsigned int value) { hdmi_writeb(hdmi, value & 0xff, HDMI_AUD_N1); @@ -162,7 +162,7 @@ static void hdmi_set_clock_regenerator_n(struct imx_hdmi *hdmi, hdmi_modb(hdmi, 0, HDMI_AUD_CTS3_N_SHIFT_MASK, HDMI_AUD_CTS3); } -static void hdmi_regenerate_cts(struct imx_hdmi *hdmi, unsigned int cts) +static void hdmi_regenerate_cts(struct dw_hdmi *hdmi, unsigned int ct
[PATCH v13 06/12] dt-bindings: add document for dw_hdmi
Signed-off-by: Andy Yan --- Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: - correct some spelling mistake - modify ddc-i2c-bus and interrupt description Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None .../devicetree/bindings/drm/bridge/dw_hdmi.txt | 40 ++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt diff --git a/Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt b/Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt new file mode 100644 index 000..107c1ca --- /dev/null +++ b/Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt @@ -0,0 +1,40 @@ +DesignWare HDMI bridge bindings + +Required properities: +- compatible: platform specific such as: + * "fsl,imx6q-hdmi" + * "fsl,imx6dl-hdmi" + * "rockchip,rk3288-dw-hdmi" +- reg: Physical base address and length of the controller's registers. +- ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing +- interrupts: The HDMI interrupt number + +Optional properties +- reg-io-width: the width of the reg:1,4, default set to 1 if not present + +Example: + hdmi: hdmi@012 { + compatible = "fsl,imx6q-hdmi"; + reg = <0x0012 0x9000>; + interrupts = <0 115 0x04>; + gpr = <&gpr>; + clocks = <&clks 123>, <&clks 124>; + clock-names = "iahb", "isfr"; + ddc-i2c-bus = <&i2c2>; + + port@0 { + reg = <0>; + + hdmi_mux_0: endpoint { + remote-endpoint = <&ipu1_di0_hdmi>; + }; + }; + + port@1 { + reg = <1>; + + hdmi_mux_1: endpoint { + remote-endpoint = <&ipu1_di1_hdmi>; + }; + }; + }; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 07/12] drm: bridge/dw_hdmi: add support for multi-byte register width access
On rockchip rk3288, only word(32-bit) accesses are permitted for hdmi registers. Byte width accesses (writeb, readb) generate an imprecise external abort. Signed-off-by: Andy Yan --- Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: - refactor register access without reg_shift Changes in v5: - refactor reg-io-width Changes in v4: None Changes in v3: - split multi-register access to one indepent patch drivers/gpu/drm/bridge/dw_hdmi.c | 57 +++- 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index a53bf63..5e88c8d 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -100,6 +100,11 @@ struct hdmi_data_info { struct hdmi_vmode video_mode; }; +union dw_reg_ptr { + u32 __iomem *p32; + u8 __iomem *p8; +}; + struct dw_hdmi { struct drm_connector connector; struct drm_encoder *encoder; @@ -121,20 +126,43 @@ struct dw_hdmi { struct regmap *regmap; struct i2c_adapter *ddc; - void __iomem *regs; + union dw_reg_ptr regs; unsigned int sample_rate; int ratio; + + void (*write)(struct dw_hdmi *hdmi, u8 val, int offset); + u8 (*read)(struct dw_hdmi *hdmi, int offset); }; +static void dw_hdmi_writel(struct dw_hdmi *hdmi, u8 val, int offset) +{ + writel(val, hdmi->regs.p32 + offset); +} + +static u8 dw_hdmi_readl(struct dw_hdmi *hdmi, int offset) +{ + return readl(hdmi->regs.p32 + offset); +} + +static void dw_hdmi_writeb(struct dw_hdmi *hdmi, u8 val, int offset) +{ + writeb(val, hdmi->regs.p8 + offset); +} + +static u8 dw_hdmi_readb(struct dw_hdmi *hdmi, int offset) +{ + return readb(hdmi->regs.p8 + offset); +} + static inline void hdmi_writeb(struct dw_hdmi *hdmi, u8 val, int offset) { - writeb(val, hdmi->regs + offset); + hdmi->write(hdmi, val, offset); } static inline u8 hdmi_readb(struct dw_hdmi *hdmi, int offset) { - return readb(hdmi->regs + offset); + return hdmi->read(hdmi, offset); } static void hdmi_modb(struct dw_hdmi *hdmi, u8 data, u8 mask, unsigned reg) @@ -1508,6 +1536,7 @@ int dw_hdmi_bind(struct device *dev, struct device *master, struct dw_hdmi *hdmi; struct resource *iores; int ret, irq; + u32 val = 1; hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL); if (!hdmi) @@ -1520,6 +1549,22 @@ int dw_hdmi_bind(struct device *dev, struct device *master, hdmi->ratio = 100; hdmi->encoder = encoder; + of_property_read_u32(np, "reg-io-width", &val); + + switch (val) { + case 4: + hdmi->write = dw_hdmi_writel; + hdmi->read = dw_hdmi_readl; + break; + case 1: + hdmi->write = dw_hdmi_writeb; + hdmi->read = dw_hdmi_readb; + break; + default: + dev_err(dev, "reg-io-width must be 1 or 4\n"); + return -EINVAL; + } + ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0); if (ddc_node) { hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node); @@ -1544,9 +1589,9 @@ int dw_hdmi_bind(struct device *dev, struct device *master, return ret; iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hdmi->regs = devm_ioremap_resource(dev, iores); - if (IS_ERR(hdmi->regs)) - return PTR_ERR(hdmi->regs); + hdmi->regs.p32 = devm_ioremap_resource(dev, iores); + if (IS_ERR(hdmi->regs.p32)) + return PTR_ERR(hdmi->regs.p32); /* Product and revision IDs */ dev_info(dev, -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 08/12] drm: bridge/dw_hdmi: add mode_valid support
some platform may not support all the display mode, add mode_valid interface check it also add drm_connector_register which add a debugfs interface for dump display modes and edid information Signed-off-by: Andy Yan --- Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/bridge/dw_hdmi.c | 17 + include/drm/bridge/dw_hdmi.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index 5e88c8d..b13e782 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -1406,6 +1406,20 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector) return 0; } +static enum drm_mode_status +dw_hdmi_connector_mode_valid(struct drm_connector *connector, +struct drm_display_mode *mode) +{ + struct dw_hdmi *hdmi = container_of(connector, + struct dw_hdmi, connector); + enum drm_mode_status mode_status = MODE_OK; + + if (hdmi->plat_data->mode_valid) + mode_status = hdmi->plat_data->mode_valid(connector, mode); + + return mode_status; +} + static struct drm_encoder *dw_hdmi_connector_best_encoder(struct drm_connector *connector) { @@ -1430,6 +1444,7 @@ static struct drm_connector_funcs dw_hdmi_connector_funcs = { static struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { .get_modes = dw_hdmi_connector_get_modes, + .mode_valid = dw_hdmi_connector_mode_valid, .best_encoder = dw_hdmi_connector_best_encoder, }; @@ -1631,6 +1646,8 @@ int dw_hdmi_bind(struct device *dev, struct device *master, dev_set_drvdata(dev, hdmi); + drm_connector_register(&hdmi->connector); + return 0; } EXPORT_SYMBOL_GPL(dw_hdmi_bind); diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h index 1bbf3ca..1777ab4 100644 --- a/include/drm/bridge/dw_hdmi.h +++ b/include/drm/bridge/dw_hdmi.h @@ -48,6 +48,8 @@ struct dw_hdmi_plat_data { const struct mpll_config *mpll_cfg; const struct curr_ctrl *cur_ctr; const struct sym_term *sym_term; + enum drm_mode_status (*mode_valid)(struct drm_connector *connector, + struct drm_display_mode *mode); }; void dw_hdmi_unbind(struct device *dev, struct device *master, void *data); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 09/12] drm: bridge/dw_hdmi: clear i2cmphy_stat0 reg in hdmi_phy_wait_i2c_done
HDMI_IH_I2CMPHY_STAT0 is a clear on write register, which indicates i2cm operation status(i2c transfer done or error), every hdmi phy register configuration must check this register to make sure the configuration has complete. But the indication bit should be cleared after check, otherwise the corresponding bit will hold on forever, this may give a wrong signal for next check. Signed-off-by: Andy Yan --- Changes in v13: None Changes in v12: None Changes in v11: - split form patch Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/bridge/dw_hdmi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index b13e782..8aa5f61 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -668,11 +668,15 @@ static inline void hdmi_phy_test_dout(struct dw_hdmi *hdmi, static bool hdmi_phy_wait_i2c_done(struct dw_hdmi *hdmi, int msec) { - while ((hdmi_readb(hdmi, HDMI_IH_I2CMPHY_STAT0) & 0x3) == 0) { + u32 val; + + while ((val = hdmi_readb(hdmi, HDMI_IH_I2CMPHY_STAT0) & 0x3) == 0) { if (msec-- == 0) return false; udelay(1000); } + hdmi_writeb(hdmi, val, HDMI_IH_I2CMPHY_STAT0); + return true; } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 10/12] drm: bridge/dw_hdmi: add function dw_hdmi_phy_enable_spare
RK3288 HDMI will not work without the spare bit of HDMI_PHY_CONF0 enable Signed-off-by: Andy Yan --- Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/bridge/dw_hdmi.c | 7 +++ drivers/gpu/drm/bridge/dw_hdmi.h | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index 8aa5f61..160f8c7 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -715,6 +715,13 @@ static void dw_hdmi_phy_enable_tmds(struct dw_hdmi *hdmi, u8 enable) HDMI_PHY_CONF0_ENTMDS_MASK); } +static void dw_hdmi_phy_enable_spare(struct dw_hdmi *hdmi, u8 enable) +{ + hdmi_mask_writeb(hdmi, enable, HDMI_PHY_CONF0, +HDMI_PHY_CONF0_SPARECTRL_OFFSET, +HDMI_PHY_CONF0_SPARECTRL_MASK); +} + static void dw_hdmi_phy_gen2_pddq(struct dw_hdmi *hdmi, u8 enable) { hdmi_mask_writeb(hdmi, enable, HDMI_PHY_CONF0, diff --git a/drivers/gpu/drm/bridge/dw_hdmi.h b/drivers/gpu/drm/bridge/dw_hdmi.h index baa7849..175dbc8 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.h +++ b/drivers/gpu/drm/bridge/dw_hdmi.h @@ -837,7 +837,8 @@ enum { HDMI_PHY_CONF0_PDZ_OFFSET = 7, HDMI_PHY_CONF0_ENTMDS_MASK = 0x40, HDMI_PHY_CONF0_ENTMDS_OFFSET = 6, - HDMI_PHY_CONF0_SPARECTRL = 0x20, + HDMI_PHY_CONF0_SPARECTRL_MASK = 0x20, + HDMI_PHY_CONF0_SPARECTRL_OFFSET = 5, HDMI_PHY_CONF0_GEN2_PDDQ_MASK = 0x10, HDMI_PHY_CONF0_GEN2_PDDQ_OFFSET = 4, HDMI_PHY_CONF0_GEN2_TXPWRON_MASK = 0x8, -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 11/12] dt-bindings: Add documentation for rockchip dw hdmi
Signed-off-by: Andy Yan --- Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: - Add documentation for rockchip dw hdmi Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None .../devicetree/bindings/video/dw_hdmi-rockchip.txt | 43 ++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt diff --git a/Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt b/Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt new file mode 100644 index 000..0735464 --- /dev/null +++ b/Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt @@ -0,0 +1,43 @@ +Rockchip specific extensions to the Synopsys Designware HDMI + + +Required properties: +- compatible: "rockchip,rk3288-dw-hdmi"; +- reg: Physical base address and length of the controller's registers. +- ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing +- clocks: from common clock binding: handle to hdmi clock. +- clock-names: should be "clk" "hdcp_clk" +- rockchip,grf: this soc should set GRF regs to mux vopl/vopb. +- interrupts: HDMI interrupt number +- ports: contain a port node with endpoint definitions as defined in + Documentation/devicetree/bindings/media/video-interfaces.txt. For + vopb,set the reg = <0> and set the reg = <1> for vopl. +- reg-io-width: the width of the reg:1,4, the value should be 4 on + rk3288 platform + +Example: +hdmi: hdmi@ff98 { + compatible = "rockchip,rk3288-dw-hdmi"; + reg = <0xff98 0x2>; + reg-io-width = <4>; + ddc-i2c-bus = <&i2c5>; + rockchip,grf = <&grf>; + interrupts = ; + clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>; + clock-names = "clk", "hdcp_clk"; + status = "disabled"; + ports { + hdmi_in: port { + #address-cells = <1>; + #size-cells = <0>; + hdmi_in_vopb: endpoint@0 { + reg = <0>; + remote-endpoint = <&vopb_out_hdmi>; + }; + hdmi_in_vopl: endpoint@1 { + reg = <1>; + remote-endpoint = <&vopl_out_hdmi>; + }; + }; + }; +}; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 12/12] drm: bridge/dw_hdmi: add rockchip rk3288 support
Rockchip RK3288 hdmi is compatible with dw_hdmi this patch is depend on patch by Mark Yao Add drm driver for Rockchip Socs see https://lkml.org/lkml/2014/11/19/1153 Signed-off-by: Andy Yan --- Changes in v13: None Changes in v12: - add comment for the depend on patch Changes in v11: None Changes in v10: - add more display mode support mpll configuration for rk3288 Changes in v9: - move some phy configuration to platform driver Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/bridge/dw_hdmi.c| 3 + drivers/gpu/drm/rockchip/Kconfig| 10 + drivers/gpu/drm/rockchip/Makefile | 2 +- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 355 include/drm/bridge/dw_hdmi.h| 1 + 5 files changed, 370 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index 160f8c7..8305390 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -853,6 +853,9 @@ static int hdmi_phy_configure(struct dw_hdmi *hdmi, unsigned char prep, dw_hdmi_phy_gen2_txpwron(hdmi, 1); dw_hdmi_phy_gen2_pddq(hdmi, 0); + if (hdmi->dev_type == RK3288_HDMI) + dw_hdmi_phy_enable_spare(hdmi, 1); + /*Wait for PHY PLL lock */ msec = 5; do { diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig index 0ff6682..06371ae 100644 --- a/drivers/gpu/drm/rockchip/Kconfig +++ b/drivers/gpu/drm/rockchip/Kconfig @@ -15,3 +15,13 @@ config DRM_ROCKCHIP management to userspace. This driver does not provide 2D or 3D acceleration; acceleration is performed by other IP found on the SoC. + +config ROCKCHIP_DW_HDMI +bool "Rockchip specific extensions for Synopsys DW HDMI" +depends on DRM_ROCKCHIP +select DRM_DW_HDMI +help + This selects support for Rockchip SoC specific extensions + for the Synopsys DesignWare HDMI driver. If you want to + enable HDMI on RK3288 based SoC, you should selet this + option. diff --git a/drivers/gpu/drm/rockchip/Makefile b/drivers/gpu/drm/rockchip/Makefile index b3a5193..347e65c 100644 --- a/drivers/gpu/drm/rockchip/Makefile +++ b/drivers/gpu/drm/rockchip/Makefile @@ -4,5 +4,5 @@ rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o rockchip_drm_fbdev.o \ rockchip_drm_gem.o rockchip_drm_vop.o - +rockchipdrm-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o obj-$(CONFIG_DRM_ROCKCHIP) += rockchipdrm.o diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c new file mode 100644 index 000..16cad75 --- /dev/null +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c @@ -0,0 +1,355 @@ +/* + * Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "rockchip_drm_drv.h" +#include "rockchip_drm_vop.h" + +#define GRF_SOC_CON60x025c +#define HDMI_SEL_VOP_LIT(1 << 4) + +struct rockchip_hdmi { + struct device *dev; + struct clk *clk; + struct clk *hdcp_clk; + struct regmap *regmap; + struct drm_encoder encoder; +}; + +#define to_rockchip_hdmi(x)container_of(x, struct rockchip_hdmi, x) + +static const struct mpll_config rockchip_mpll_cfg[] = { + { + 2700, { + { 0x00b3, 0x}, + { 0x2153, 0x}, + { 0x40f3, 0x} + }, + }, { + 3600, { + { 0x00b3, 0x}, + { 0x2153, 0x}, + { 0x40f3, 0x} + }, + }, { + 4000, { + { 0x00b3, 0x}, + { 0x2153, 0x}, + { 0x40f3, 0x} + }, + }, { + 5400, { + { 0x0072, 0x0001}, + { 0x2142, 0x0001}, + { 0x40a2, 0x0001}, + }, + }, { + 6500, { + { 0x0072, 0x0001}, + { 0x2142, 0x0001}, + { 0x40a2, 0x0001}, + }, + }, { + 6600, { + { 0x013e, 0x0003}, + { 0x217e, 0x0002}, + { 0x4061, 0x0002} +
[PATCH] Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors
When an SMP Hyper-V guest is running on top of 2012R2 Server and secondary cpus are sent offline (with echo 0 > /sys/devices/system/cpu/cpu$cpu/online) the system freeze is observed. This happens due to the fact that on newer hypervisors (Win8, WS2012R2, ...) vmbus channel handlers are distributed across all cpus (see init_vp_index() function in drivers/hv/channel_mgmt.c) and on cpu offlining nobody reassigns them to CPU0. Prevent cpu offlining when vmbus is loaded until the issue is fixed host-side. This patch also disables hibernation but it is OK as it is also broken (MCE error is hit on resume). Suspend still works. Tested with WS2008R2 and WS2012R2. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/vmbus_drv.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 4d6b269..9a82249 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -671,6 +672,13 @@ static void vmbus_isr(void) tasklet_schedule(&msg_dpc); } +#ifdef CONFIG_HOTPLUG_CPU +static int hyperv_cpu_disable(void) +{ + return -1; +} +#endif + /* * vmbus_bus_init -Main vmbus driver initialization routine. * @@ -711,6 +719,12 @@ static int vmbus_bus_init(int irq) if (ret) goto err_alloc; +#ifdef CONFIG_HOTPLUG_CPU + if ((vmbus_proto_version != VERSION_WS2008) && + (vmbus_proto_version != VERSION_WIN7)) + smp_ops.cpu_disable = hyperv_cpu_disable; +#endif + vmbus_request_offers(); return 0; @@ -964,6 +978,11 @@ static void __exit vmbus_exit(void) bus_unregister(&hv_bus); hv_cleanup(); acpi_bus_unregister_driver(&vmbus_acpi_driver); +#ifdef CONFIG_HOTPLUG_CPU + if ((vmbus_proto_version != VERSION_WS2008) && + (vmbus_proto_version != VERSION_WIN7)) + smp_ops.cpu_disable = native_cpu_disable; +#endif } -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Wed, 2014-11-26 at 15:42 +, Luis de Bethencourt wrote: > On 26 November 2014 at 01:49, Joe Perches wrote: [] > > There is a script I posted a while back that > > groups various checkpatch "types" together and > > makes it a bit easier to do cleanup style > > patches. > > > > https://lkml.org/lkml/2014/7/11/794 > That is useful! I just run it on staging/octeon/ and it wrote two patches. > Will submit them in a minute. Please make sure and write better commit messages than the script produces. > > Using checkpatch to get familiar with kernel > > development is fine and all, but fixing actual > > defects and submitting new code is way more > > useful. [] > I agree. I was just using checkpatch to learn about the development process. > How to create patches, submit patches, follow review, and such. Better to > do it > with small changes like this first. That's a good way to start. > Which makes me wonder. Is my patch accepted? Will it be merged? I can do the > proposed logging macro additions in a few days. Not sure yet how the final > step of the process when patches get accepted and merged works. You will generally get an email from a maintainer when patches are accepted/rejected or you get feedback asking for various changes. Greg KH does that for drivers/staging but not for drivers/staging/media. Mauro Carvalho Chehab does. These emails are not immediate. It can take 2 or 3 weeks for a response. Sometimes longer, sometimes shorter, sometimes no response ever comes. After a month or so, if you get no response, maybe the maintainer never saw it. You should maybe expand the cc: list for the email. When the patch is more than a trivial style cleanup, Andrew Morton generally picks up orphan patches. For some subsystems, there are "tracking" mechanisms like patchwork: For instance, netdev (net/ and drivers/net/) uses: http://patchwork.ozlabs.org/project/netdev/list/ and David Miller, the primary networking maintainer is very prompt about updating it. There's this list of patchwork entries, but maintainer activity of these lists vary: https://patchwork.kernel.org/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v13 0/12] dw-hdmi: convert imx hdmi to bridge/dw_hdmi
Hi Andy, I have yet to look at this in more detail, but from a quick test starting with patch 3, the HDMI display stays black on Nitrogen6X, and starting with patch 8 I get the following error. imx-drm display-subsystem: [CONNECTOR:21:HDMI-A-1] drm_connector_register failed: -12 [ cut here ] WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:851 __clk_disable+0x6c/0x70() Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.18.0-rc6+ #8377 Backtrace: [<80012414>] (dump_backtrace) from [<80012754>] (show_stack+0x20/0x24) r6:0353 r5: r4:8083ea08 r3: [<80012734>] (show_stack) from [<805ae670>] (dump_stack+0x8c/0x9c) [<805ae5e4>] (dump_stack) from [<80022744>] (warn_slowpath_common+0x80/0x9c) r5:0009 r4: [<800226c4>] (warn_slowpath_common) from [<8002281c>] (warn_slowpath_null+0x2c/0x34) r8:b721c610 r7:b72b0400 r6:b735504c r5:8113 r4:b735504c [<800227f0>] (warn_slowpath_null) from [<80458088>] (__clk_disable+0x6c/0x70) [<8045801c>] (__clk_disable) from [<804581a8>] (clk_disable+0x34/0x40) r4:b735504c r3:b700e000 [<80458174>] (clk_disable) from [<803241f0>] (dw_hdmi_imx_unbind+0x30/0x60) r5:b7355010 r4:b7219a10 [<803241c0>] (dw_hdmi_imx_unbind) from [<8032fc84>] (component_unbind.isra.3+0x40/0x78) r8:b72a1e40 r7:b725f158 r6:b72b0400 r5:b725f158 r4:b725f4c0 r3:803241c0 [<8032fc44>] (component_unbind.isra.3) from [<8032fd44>] (component_unbind_all+0x88/0xb8) r5:b725f4c0 r4:b725f140 [<8032fcbc>] (component_unbind_all) from [<80321a3c>] (imx_drm_driver_load+0x100/0x13c) r7:b72b05cc r6:fff4 r5:b7355010 r4:b72b0400 [<8032193c>] (imx_drm_driver_load) from [<8030c260>] (drm_dev_register+0xb8/0x114) r7:b686ad10 r6: r5: r4:b72b0400 [<8030c1a8>] (drm_dev_register) from [<8030dd58>] (drm_platform_init+0x54/0xe8) r6:80844bf4 r5:b721c600 r4:b72b0400 r3: [<8030dd04>] (drm_platform_init) from [<803218e8>] (imx_drm_bind+0x20/0x28) r6:b725f140 r5:000c r4:b686ad70 [<803218c8>] (imx_drm_bind) from [<8032f9b0>] (try_to_bring_up_master.part.2+0xd8/0x118) [<8032f8d8>] (try_to_bring_up_master.part.2) from [<8032fbe4>] (component_add+0xa0/0x100) r8:b72a1c40 r7:80602b6c r6:b72a1e40 r5:808451e8 r4:b725f140 r3: [<8032fb44>] (component_add) from [<8032330c>] (ipu_drm_probe+0x7c/0x150) r7:b682ba10 r6:b77b3cc0 r5:b682ba00 r4:b77b4868 [<80323290>] (ipu_drm_probe) from [<80336640>] (platform_drv_probe+0x54/0xb4) r9: r8: r7:80844e94 r6:80844e94 r5:fdfb r4:b682ba10 [<803365ec>] (platform_drv_probe) from [<803348a8>] (driver_probe_device+0x128/0x25c) r7:80844e94 r6: r5:808bc064 r4:b682ba10 [<80334780>] (driver_probe_device) from [<80334a2c>] (__device_attach+0x50/0x54) r8: r7:b721c410 r6:803349dc r5:b682ba10 r4:80844e94 r3:80336838 [<803349dc>] (__device_attach) from [<80332c34>] (bus_for_each_drv+0x68/0x9c) r5:b682ba10 r4: [<80332bcc>] (bus_for_each_drv) from [<8033473c>] (device_attach+0x84/0x98) r6:808454e0 r5:b682ba44 r4:b682ba10 [<803346b8>] (device_attach) from [<80333d14>] (bus_probe_device+0x94/0xb8) r6:808454e0 r5:b682ba10 r4:b682ba18 r3:b7046800 [<80333c80>] (bus_probe_device) from [<80331e58>] (device_add+0x450/0x530) r6:b682ba10 r5: r4:b682ba18 r3: [<80331a08>] (device_add) from [<803362c8>] (platform_device_add+0xc4/0x228) r9:0006 r8:b721c410 r7:b7079cc4 r6:b682ba10 r5:b682ba00 r4: [<80336204>] (platform_device_add) from [<80336b60>] (platform_device_register_full+0xcc/0xf0) r7:b7079cc4 r6:b7079ce0 r5:b682ba00 r4:b7079ce0 [<80336a94>] (platform_device_register_full) from [<80328354>] (ipu_add_client_devices.isra.10+0x164/0x19c) r5: r4:b7079ce0 [<803281f0>] (ipu_add_client_devices.isra.10) from [<80328940>] (ipu_probe+0x5b4/0x740) r10:808450d4 r9:0001 r8:b7028180 r7:b72b0010 r6:808450d4 r5: r4:b721c410 [<8032838c>] (ipu_probe) from [<80336640>] (platform_drv_probe+0x54/0xb4) r10: r9:b725f580 r8: r7:80845078 r6:80845078 r5:fdfb r4:b721c410 [<803365ec>] (platform_drv_probe) from [<803348a8>] (driver_probe_device+0x128/0x25c) r7:80845078 r6: r5:808bc064 r4:b721c410 [<80334780>] (driver_probe_device) from [<80334acc>] (__driver_attach+0x9c/0xa0) r8:807ab5e8 r7: r6:b721c444 r5:80845078 r4:b721c410 r3: [<80334a30>] (__driver_attach) from [<80332b6c>] (bus_for_each_dev+0x70/0xa4) r6:80334a30 r5:80845078 r4: r3:b704685c [<80332afc>] (bus_for_each_dev) from [<80334334>] (driver_attach+0x2c/0x30) r6:808454e0 r5:b728d000 r4:80845078 [<80334308>] (driver_attach) from [<80333fac>] (bus_add_driver+0x15c/0x204) [<80333e50>] (bus_add_driver) from [<803352d4>] (driver_register+0x88/0x108) r7:b7078000 r6:807d86c0 r5:8082be60 r4:80845078 [<8033524c>] (driver_register) from [<8033656c>] (__platform_driver_register+0x64/0x6c) r5:8082be60 r4:8082be60 [<80336508>] (__platform_driver_register) from [<807d86dc>] (imx_ipu_driver_init+0x1c/0x20) [<807d86c0>] (imx_ipu_dr
[PATCH] staging: lustre: fix sparse warnings related to lock context imbalance
Add __acquires() and __releases() function annotations, to fix sparse warnings related to lock context imbalance. This fixes the following warnings: drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c:153:5: warning: context imbalance in 'cfs_trace_lock_tcd' - wrong count at exit drivers/staging/lustre/lustre/libcfs/hash.c:128:1: warning: context imbalance in 'cfs_hash_spin_lock' - wrong count at exit drivers/staging/lustre/lustre/libcfs/hash.c:142:9: warning: context imbalance in 'cfs_hash_rw_lock' - wrong count at exit drivers/staging/lustre/lustre/ptlrpc/../../lustre/ldlm/l_lock.c:57:17: warning: context imbalance in 'lock_res_and_lock' - wrong count at exit drivers/staging/lustre/lustre/libcfs/libcfs_lock.c:93:1: warning: context imbalance in 'cfs_percpt_lock' - wrong count at exit Signed-off-by: Loic Pefferkorn --- drivers/staging/lustre/lustre/libcfs/hash.c | 4 drivers/staging/lustre/lustre/libcfs/libcfs_lock.c | 2 ++ drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c | 2 ++ drivers/staging/lustre/lustre/obdclass/cl_object.c | 2 ++ 4 files changed, 10 insertions(+) diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c b/drivers/staging/lustre/lustre/libcfs/hash.c index 32da783..7c6e2a3 100644 --- a/drivers/staging/lustre/lustre/libcfs/hash.c +++ b/drivers/staging/lustre/lustre/libcfs/hash.c @@ -126,18 +126,21 @@ cfs_hash_nl_unlock(union cfs_hash_lock *lock, int exclusive) {} static inline void cfs_hash_spin_lock(union cfs_hash_lock *lock, int exclusive) + __acquires(&lock->spin) { spin_lock(&lock->spin); } static inline void cfs_hash_spin_unlock(union cfs_hash_lock *lock, int exclusive) + __releases(&lock->spin) { spin_unlock(&lock->spin); } static inline void cfs_hash_rw_lock(union cfs_hash_lock *lock, int exclusive) + __acquires(&lock->rw) { if (!exclusive) read_lock(&lock->rw); @@ -147,6 +150,7 @@ cfs_hash_rw_lock(union cfs_hash_lock *lock, int exclusive) static inline void cfs_hash_rw_unlock(union cfs_hash_lock *lock, int exclusive) + __releases(&lock->rw) { if (!exclusive) read_unlock(&lock->rw); diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c b/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c index 2c199c7..1e529fc 100644 --- a/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c +++ b/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c @@ -91,6 +91,7 @@ EXPORT_SYMBOL(cfs_percpt_lock_alloc); */ void cfs_percpt_lock(struct cfs_percpt_lock *pcl, int index) + __acquires(pcl->pcl_locks[index]) { int ncpt = cfs_cpt_number(pcl->pcl_cptab); int i; @@ -125,6 +126,7 @@ EXPORT_SYMBOL(cfs_percpt_lock); /** unlock a CPU partition */ void cfs_percpt_unlock(struct cfs_percpt_lock *pcl, int index) + __releases(pcl->pcl_locks[index]) { int ncpt = cfs_cpt_number(pcl->pcl_cptab); int i; diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c index 976c61e..257669b 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c @@ -151,6 +151,7 @@ cfs_trace_buf_type_t cfs_trace_buf_idx_get(void) * for details. */ int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd, int walking) + __acquires(&tcd->tc_lock) { __LASSERT(tcd->tcd_type < CFS_TCD_TYPE_MAX); if (tcd->tcd_type == CFS_TCD_TYPE_IRQ) @@ -165,6 +166,7 @@ int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd, int walking) } void cfs_trace_unlock_tcd(struct cfs_trace_cpu_data *tcd, int walking) + __releases(&tcd->tcd_lock) { __LASSERT(tcd->tcd_type < CFS_TCD_TYPE_MAX); if (tcd->tcd_type == CFS_TCD_TYPE_IRQ) diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c index ce96bd2..8577f97 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_object.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c @@ -193,6 +193,7 @@ static spinlock_t *cl_object_attr_guard(struct cl_object *o) * cl_object_attr_get(), cl_object_attr_set(). */ void cl_object_attr_lock(struct cl_object *o) + __acquires(cl_object_attr_guard(o)) { spin_lock(cl_object_attr_guard(o)); } @@ -202,6 +203,7 @@ EXPORT_SYMBOL(cl_object_attr_lock); * Releases data-attributes lock, acquired by cl_object_attr_lock(). */ void cl_object_attr_unlock(struct cl_object *o) + __releases(cl_object_attr_guard(o)) { spin_unlock(cl_object_attr_guard(o)); } -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v13 08/12] drm: bridge/dw_hdmi: add mode_valid support
Am Mittwoch, den 26.11.2014, 21:33 +0800 schrieb Andy Yan: > some platform may not support all the display mode, > add mode_valid interface check it > > also add drm_connector_register which add a debugfs > interface for dump display modes and edid information > > Signed-off-by: Andy Yan > --- > > Changes in v13: None > Changes in v12: None > Changes in v11: None > Changes in v10: None > Changes in v9: None > Changes in v8: None > Changes in v7: None > Changes in v6: None > Changes in v5: None > Changes in v4: None > Changes in v3: None > > drivers/gpu/drm/bridge/dw_hdmi.c | 17 + > include/drm/bridge/dw_hdmi.h | 2 ++ > 2 files changed, 19 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c > b/drivers/gpu/drm/bridge/dw_hdmi.c > index 5e88c8d..b13e782 100644 > --- a/drivers/gpu/drm/bridge/dw_hdmi.c > +++ b/drivers/gpu/drm/bridge/dw_hdmi.c > @@ -1406,6 +1406,20 @@ static int dw_hdmi_connector_get_modes(struct > drm_connector *connector) > return 0; > } > > +static enum drm_mode_status > +dw_hdmi_connector_mode_valid(struct drm_connector *connector, > + struct drm_display_mode *mode) > +{ > + struct dw_hdmi *hdmi = container_of(connector, > +struct dw_hdmi, connector); > + enum drm_mode_status mode_status = MODE_OK; > + > + if (hdmi->plat_data->mode_valid) > + mode_status = hdmi->plat_data->mode_valid(connector, mode); > + > + return mode_status; > +} > + > static struct drm_encoder *dw_hdmi_connector_best_encoder(struct > drm_connector > *connector) > { > @@ -1430,6 +1444,7 @@ static struct drm_connector_funcs > dw_hdmi_connector_funcs = { > > static struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { > .get_modes = dw_hdmi_connector_get_modes, > + .mode_valid = dw_hdmi_connector_mode_valid, > .best_encoder = dw_hdmi_connector_best_encoder, > }; > > @@ -1631,6 +1646,8 @@ int dw_hdmi_bind(struct device *dev, struct device > *master, > > dev_set_drvdata(dev, hdmi); > > + drm_connector_register(&hdmi->connector); > + This is not right, the connector is registered by the imx-drm core in the drm_driver .load callback. regards Philipp ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v13 07/12] drm: bridge/dw_hdmi: add support for multi-byte register width access
Am Mittwoch, den 26.11.2014, 21:32 +0800 schrieb Andy Yan: > On rockchip rk3288, only word(32-bit) accesses are > permitted for hdmi registers. Byte width accesses (writeb, > readb) generate an imprecise external abort. > > Signed-off-by: Andy Yan > > --- > > Changes in v13: None > Changes in v12: None > Changes in v11: None > Changes in v10: None > Changes in v9: None > Changes in v8: None > Changes in v7: None > Changes in v6: > - refactor register access without reg_shift > > Changes in v5: > - refactor reg-io-width > > Changes in v4: None > Changes in v3: > - split multi-register access to one indepent patch > > drivers/gpu/drm/bridge/dw_hdmi.c | 57 > +++- > 1 file changed, 51 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c > b/drivers/gpu/drm/bridge/dw_hdmi.c > index a53bf63..5e88c8d 100644 > --- a/drivers/gpu/drm/bridge/dw_hdmi.c > +++ b/drivers/gpu/drm/bridge/dw_hdmi.c > @@ -100,6 +100,11 @@ struct hdmi_data_info { > struct hdmi_vmode video_mode; > }; > > +union dw_reg_ptr { > + u32 __iomem *p32; > + u8 __iomem *p8; > +}; I see no need to introduce this. Just explicitly multiply the offset in dw_hdmi_writel. > struct dw_hdmi { > struct drm_connector connector; > struct drm_encoder *encoder; > @@ -121,20 +126,43 @@ struct dw_hdmi { > > struct regmap *regmap; > struct i2c_adapter *ddc; > - void __iomem *regs; > + union dw_reg_ptr regs; Keep this as void __iomem * > unsigned int sample_rate; > int ratio; > + > + void (*write)(struct dw_hdmi *hdmi, u8 val, int offset); > + u8 (*read)(struct dw_hdmi *hdmi, int offset); > }; > > +static void dw_hdmi_writel(struct dw_hdmi *hdmi, u8 val, int offset) > +{ > + writel(val, hdmi->regs.p32 + offset); hdmi->regs + 4 * offset > +} > + > +static u8 dw_hdmi_readl(struct dw_hdmi *hdmi, int offset) > +{ > + return readl(hdmi->regs.p32 + offset); same here > +} > + > +static void dw_hdmi_writeb(struct dw_hdmi *hdmi, u8 val, int offset) > +{ > + writeb(val, hdmi->regs.p8 + offset); > +} > + > +static u8 dw_hdmi_readb(struct dw_hdmi *hdmi, int offset) > +{ > + return readb(hdmi->regs.p8 + offset); > +} > + > static inline void hdmi_writeb(struct dw_hdmi *hdmi, u8 val, int offset) > { > - writeb(val, hdmi->regs + offset); > + hdmi->write(hdmi, val, offset); > } > > static inline u8 hdmi_readb(struct dw_hdmi *hdmi, int offset) > { > - return readb(hdmi->regs + offset); > + return hdmi->read(hdmi, offset); > } > > static void hdmi_modb(struct dw_hdmi *hdmi, u8 data, u8 mask, unsigned reg) > @@ -1508,6 +1536,7 @@ int dw_hdmi_bind(struct device *dev, struct device > *master, > struct dw_hdmi *hdmi; > struct resource *iores; > int ret, irq; > + u32 val = 1; > > hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL); > if (!hdmi) > @@ -1520,6 +1549,22 @@ int dw_hdmi_bind(struct device *dev, struct device > *master, > hdmi->ratio = 100; > hdmi->encoder = encoder; > > + of_property_read_u32(np, "reg-io-width", &val); > + > + switch (val) { > + case 4: > + hdmi->write = dw_hdmi_writel; > + hdmi->read = dw_hdmi_readl; > + break; > + case 1: > + hdmi->write = dw_hdmi_writeb; > + hdmi->read = dw_hdmi_readb; > + break; > + default: > + dev_err(dev, "reg-io-width must be 1 or 4\n"); > + return -EINVAL; > + } > + > ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0); > if (ddc_node) { > hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node); > @@ -1544,9 +1589,9 @@ int dw_hdmi_bind(struct device *dev, struct device > *master, > return ret; > > iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - hdmi->regs = devm_ioremap_resource(dev, iores); > - if (IS_ERR(hdmi->regs)) > - return PTR_ERR(hdmi->regs); > + hdmi->regs.p32 = devm_ioremap_resource(dev, iores); > + if (IS_ERR(hdmi->regs.p32)) > + return PTR_ERR(hdmi->regs.p32); > > /* Product and revision IDs */ > dev_info(dev, regards Philipp ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 1/2] drm: imx: Move imx-drm driver out of staging
Am Mittwoch, den 26.11.2014, 09:43 +1000 schrieb Dave Airlie: > On 25 November 2014 at 01:33, Philipp Zabel wrote: > > The imx-drm driver was put into staging mostly for the following reasons, > > all of which have been addressed or superseded: > > - convert the irq driver to use linear irq domains > > - work out the device tree bindings, this lead to the common of_graph > >bindings being used > > - factor out common helper functions, this mostly resulted in the > >component framework and drm of_graph helpers. > > > > Before adding new fixes, and certainly before adding new features, > > move it into its proper place below drivers/gpu/drm. > > > > Signed-off-by: Philipp Zabel > > --- > > FYI I've merged this into drm-next, which I think is probably the best place. Thank you. This would have been my request in the cover letter that I prepared and then forgot to send out with the patches. regards Philipp ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
atualização sua conta
Uma tentativa foi feita para sua conta a partir de um computador desconhecido. para a segurança da sua conta, estamos prontos para abrir uma consulta ou atualização sua conta. Por favor, preencha os dados abaixo: nome: Endereço de email: password: Re-digite a senha: Tel: Te agradece sistema Administrador Centro ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging:rtl8723au: core: fix checkpatch error: that open brace { should be on the previous line
On Tue, Nov 11, 2014 at 03:28:57PM +0530, Sanjeev Sharma wrote: > This is a patch to the rtw_cmd.c file that fixes following > Error. > > ERROR: that open brace { should be on the previous line This patch does much more than that :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 10/10] staging: lustre: ldlm: Add a space in debug output
On Sun, Nov 23, 2014 at 02:37:57PM +0100, Andreas Ruprecht wrote: > A space which was forgotten in a CDEBUG output is added by this patch. > > Signed-off-by: Andreas Ruprecht > --- > drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > index 13bee5a..e089c3d 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > @@ -2254,7 +2254,7 @@ static void ldlm_cancel_unused_locks_for_replay(struct > ldlm_namespace *ns) > int canceled; > LIST_HEAD(cancels); > > - CDEBUG(D_DLMTRACE, "Dropping as many unused locks as possible before" > + CDEBUG(D_DLMTRACE, "Dropping as many unused locks as possible before " > "replay for namespace %s (%d)\n", > ldlm_ns_name(ns), ns->ns_nr_unused); > > -- > 1.9.1 Doesn't apply to my tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/2] fix some sparse warnings in lustre
On Mon, Nov 24, 2014 at 07:55:40PM +0100, Zahari Doychev wrote: > The two patches fix several sparse warning in the lustre module. > > Zahari Doychev (2): > [drivers] staging/lustre: fix sparse warnings > [drivers] staging/lustre: fix sparse warnings > > drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 14 +- > drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 15 ++- > 2 files changed, 19 insertions(+), 10 deletions(-) Please fix up and resend anything still pending, I've purged your patches from my queue now as they all seem to not be correct :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: lustre: fix sparse warnings related to lock context imbalance
On Wed, Nov 26, 2014 at 05:15:48PM +0100, Loic Pefferkorn wrote: > Add __acquires() and __releases() function annotations, to fix sparse > warnings related to lock context imbalance. > > This fixes the following warnings: > > drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c:153:5: warning: > context imbalance in 'cfs_trace_lock_tcd' - wrong count at exit > drivers/staging/lustre/lustre/libcfs/hash.c:128:1: warning: context imbalance > in 'cfs_hash_spin_lock' - wrong count at exit > drivers/staging/lustre/lustre/libcfs/hash.c:142:9: warning: context imbalance > in 'cfs_hash_rw_lock' - wrong count at exit > drivers/staging/lustre/lustre/ptlrpc/../../lustre/ldlm/l_lock.c:57:17: > warning: context imbalance in 'lock_res_and_lock' - wrong count at exit > drivers/staging/lustre/lustre/libcfs/libcfs_lock.c:93:1: warning: context > imbalance in 'cfs_percpt_lock' - wrong count at exit > > Signed-off-by: Loic Pefferkorn > --- > drivers/staging/lustre/lustre/libcfs/hash.c | 4 > drivers/staging/lustre/lustre/libcfs/libcfs_lock.c | 2 ++ > drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c | 2 ++ > drivers/staging/lustre/lustre/obdclass/cl_object.c | 2 ++ > 4 files changed, 10 insertions(+) > > diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c > b/drivers/staging/lustre/lustre/libcfs/hash.c > index 32da783..7c6e2a3 100644 > --- a/drivers/staging/lustre/lustre/libcfs/hash.c > +++ b/drivers/staging/lustre/lustre/libcfs/hash.c > @@ -126,18 +126,21 @@ cfs_hash_nl_unlock(union cfs_hash_lock *lock, int > exclusive) {} > > static inline void > cfs_hash_spin_lock(union cfs_hash_lock *lock, int exclusive) > + __acquires(&lock->spin) > { > spin_lock(&lock->spin); > } > > static inline void > cfs_hash_spin_unlock(union cfs_hash_lock *lock, int exclusive) > + __releases(&lock->spin) > { > spin_unlock(&lock->spin); > } Ugh, how horrid, please just delete these functions and push down the spin_lock/unlock calls down into the places these are called. > > static inline void > cfs_hash_rw_lock(union cfs_hash_lock *lock, int exclusive) > + __acquires(&lock->rw) > { > if (!exclusive) > read_lock(&lock->rw); > @@ -147,6 +150,7 @@ cfs_hash_rw_lock(union cfs_hash_lock *lock, int exclusive) > > static inline void > cfs_hash_rw_unlock(union cfs_hash_lock *lock, int exclusive) > + __releases(&lock->rw) > { > if (!exclusive) > read_unlock(&lock->rw); Same for these. > diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c > b/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c > index 2c199c7..1e529fc 100644 > --- a/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c > +++ b/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c > @@ -91,6 +91,7 @@ EXPORT_SYMBOL(cfs_percpt_lock_alloc); > */ > void > cfs_percpt_lock(struct cfs_percpt_lock *pcl, int index) > + __acquires(pcl->pcl_locks[index]) > { > int ncpt = cfs_cpt_number(pcl->pcl_cptab); > int i; > @@ -125,6 +126,7 @@ EXPORT_SYMBOL(cfs_percpt_lock); > /** unlock a CPU partition */ > void > cfs_percpt_unlock(struct cfs_percpt_lock *pcl, int index) > + __releases(pcl->pcl_locks[index]) > { > int ncpt = cfs_cpt_number(pcl->pcl_cptab); > int i; > diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c > b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c > index 976c61e..257669b 100644 > --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c > +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c > @@ -151,6 +151,7 @@ cfs_trace_buf_type_t cfs_trace_buf_idx_get(void) > * for details. > */ > int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd, int walking) > + __acquires(&tcd->tc_lock) > { > __LASSERT(tcd->tcd_type < CFS_TCD_TYPE_MAX); > if (tcd->tcd_type == CFS_TCD_TYPE_IRQ) > @@ -165,6 +166,7 @@ int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd, > int walking) > } > > void cfs_trace_unlock_tcd(struct cfs_trace_cpu_data *tcd, int walking) > + __releases(&tcd->tcd_lock) > { > __LASSERT(tcd->tcd_type < CFS_TCD_TYPE_MAX); > if (tcd->tcd_type == CFS_TCD_TYPE_IRQ) > diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c > b/drivers/staging/lustre/lustre/obdclass/cl_object.c > index ce96bd2..8577f97 100644 > --- a/drivers/staging/lustre/lustre/obdclass/cl_object.c > +++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c > @@ -193,6 +193,7 @@ static spinlock_t *cl_object_attr_guard(struct cl_object > *o) > * cl_object_attr_get(), cl_object_attr_set(). > */ > void cl_object_attr_lock(struct cl_object *o) > + __acquires(cl_object_attr_guard(o)) > { > spin_lock(cl_object_attr_guard(o)); > } > @@ -202,6 +203,7 @@ EXPORT_SYMBOL(cl_object_attr_lock); > * Releases data-attributes lock, acquired by cl_object_attr_lock(). > */ > void cl
Re: [PATCH] staging: unisys: Remove chanstub files
On Fri, Nov 07, 2014 at 10:17:40AM -0800, Greg KH wrote: > On Fri, Nov 07, 2014 at 12:58:24PM -0500, Ken Depro wrote: > > While fixing the CamelCase checks for the functions in the chanstub > > source and header files, I discovered they are no longer being used. > > This patch removes the two chanstub files, and deletes the #include > > of these files from uislib.c and uisqueue.c. It also removes the > > chanstub.o from the channels Makefile. > > Are you sure this patch is correct? You now have no MODULE_LICENSE or > other MODULE_* information for this module, and you have no > module_init() or _exit calls. You might not need the init/exit calls, > but you will need the MODULE_LICENSE macro. Given that you seem to be ignoring my emails, I'll just go dump the pending patches you have sent me for this driver, as there seems to be a problem in the feedback loop here. Please resend all of your pending patches after fixing this. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 00/10] parser.h and parser.c patches
On Wed, Nov 12, 2014 at 11:28:15AM -0500, Jeffrey Brown wrote: > Sorry for all of the messy patches from before but here > are the improved patches for parser.h and parser.c. > The camel cases are grouped on functions and structs > that occurs in both files. You have to do a 'vN' where 'N' is a number saying that this obsoletes previous patches from you. And I'm totally confused here as to what patches to apply, so please, just resend all of the pending unisys patches you have, in the order you need me to apply them in. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 11/11] staging: unisys: small bug parser.c
On Thu, Nov 13, 2014 at 09:56:39AM -0500, Jeffrey Brown wrote: > Fixed small bug in parser.c by removing "cleanups:" in parser_init > _guts struct. Replaced it with proper error handling code > and removed the instances of rc = NULL in the code. rc = NULL is > redudant > > Signed-off-by: Jeffrey Brown > --- > drivers/staging/unisys/visorchipset/parser.c | 46 ++--- > 1 files changed, 11 insertions(+), 35 deletions(-) where are patches 01/11 - 10/11? Totally confused. What would you do if you were on the receiving end of all of this mess? Am just now deleting all unisys patches from my queue. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: unisys: get rid of channel stub
I _strongly_ suggest unisys get their act together here. The number of patches that were sent recently that make no sense at all is horrid. I've now purged all of them from my to-apply queue, please resend _everything_ that you have, in the correct order, _AFTER_ you all review them among yourselves and agree that they are correct. I also want to see signed-off-by: from more than one person here, showing that someone has actually reviewed them, and takes responsibility for them. In other words, start acting like a maintainer of a subsystem, don't throw random crap all over the place and expect me to sort it out. Otherwise I'll "sort it out" by just deleting the code from the tree. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/2] staging: android: ion: One function call less in ion_buffer_create() after error detection
On Sun, Nov 23, 2014 at 07:44:08PM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 23 Nov 2014 19:12:29 +0100 > > The jump label "err1" was used by the ion_buffer_create() function in case of > a memory allocation failure just to pass a null pointer to a vfree() function > call by a data structure element. > This implementation detail could be improved by the deletion of this > inappropriate jump label. > > Signed-off-by: Markus Elfring > --- > drivers/staging/android/ion/ion.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/android/ion/ion.c > b/drivers/staging/android/ion/ion.c > index df12cc3..7a26b85 100644 > --- a/drivers/staging/android/ion/ion.c > +++ b/drivers/staging/android/ion/ion.c > @@ -226,7 +226,7 @@ static struct ion_buffer *ion_buffer_create(struct > ion_heap *heap, > buffer->pages = vmalloc(sizeof(struct page *) * num_pages); > if (!buffer->pages) { > ret = -ENOMEM; > - goto err1; > + goto err2; > } > > for_each_sg(table->sgl, sg, table->nents, i) { > @@ -262,7 +262,6 @@ static struct ion_buffer *ion_buffer_create(struct > ion_heap *heap, > err: > heap->ops->unmap_dma(heap, buffer); > heap->ops->free(buffer); > -err1: > vfree(buffer->pages); > err2: Now we have "err" and "err2", which doesn't make much sense, please fix up. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:Staging:octeon: Fixed missing a blank line warning
On Thu, Nov 20, 2014 at 11:31:14PM +0530, Lekshmi wrote: > The following checkpatch warning was fixed: > WARNING: Missing a blank line after declarations > > Signed-off-by: Lekshmi I need a "full name" here, sorry. Please fix and resend. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:staging:octeon: Fixed checkpatch warning
On Wed, Nov 26, 2014 at 05:58:37PM +0530, Athira Lekshmi C V wrote: > Fixed the checkpatch warning: > WARNING: Missing a blank line after declarations > > Signed-off-by: Athira Lekshmi C V What is the "C V" at the end of the name here? Is that your "full name"? I need a real name, not initials. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: octeon: Fix checkpatch warning
On Tue, Nov 25, 2014 at 01:26:14PM +, Luis de Bethencourt wrote: > This patch fixes the checkpatch.pl warnings: > > WARNING: line over 80 characters > + int cores_in_use = core_state.baseline_cores - > atomic_read(&core_state.available_cores); > > WARNING: line over 80 characters > + skb->data = skb->head + work->packet_ptr.s.addr - > cvmx_ptr_to_phys(skb->head); > > Signed-off-by: Luis de Bethencourt > --- > drivers/staging/octeon/ethernet-rx.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/octeon/ethernet-rx.c > b/drivers/staging/octeon/ethernet-rx.c > index 44e372f..bd83f55 100644 > --- a/drivers/staging/octeon/ethernet-rx.c > +++ b/drivers/staging/octeon/ethernet-rx.c > @@ -295,7 +295,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, > int budget) >*/ > union cvmx_pow_wq_int_cntx counts; > int backlog; > - int cores_in_use = core_state.baseline_cores - > atomic_read(&core_state.available_cores); > + int cores_in_use = core_state.baseline_cores - > + atomic_read(&core_state.available_cores); > counts.u64 = > cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group)); > backlog = counts.s.iq_cnt + counts.s.ds_cnt; > if (backlog > budget * cores_in_use && napi != NULL) > @@ -324,7 +325,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, > int budget) >* buffer. >*/ > if (likely(skb_in_hw)) { > - skb->data = skb->head + work->packet_ptr.s.addr - > cvmx_ptr_to_phys(skb->head); > + skb->data = skb->head + work->packet_ptr.s.addr - > + cvmx_ptr_to_phys(skb->head); > prefetch(skb->data); > skb->len = work->len; > skb_set_tail_pointer(skb, skb->len); > -- > 2.1.3 No longer applies to my tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] iio: Add support for waveform output
Output can be held high or low for a specified period of time. Support for waveform capture could be added in the future. Signed-off-by: George McCollister --- Documentation/ABI/testing/sysfs-bus-iio | 7 +++ drivers/iio/industrialio-core.c | 3 +++ drivers/staging/iio/Documentation/iio_event_monitor.c | 2 ++ include/linux/iio/types.h | 5 - 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index d760b02..47df169 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1028,3 +1028,10 @@ Contact: linux-...@vger.kernel.org Description: Raw value of rotation from true/magnetic north measured with or without compensation from tilt sensors. + +What: /sys/bus/iio/devices/iio:deviceX/out_waveformY_hightime_raw +What: /sys/bus/iio/devices/iio:deviceX/out_waveformY_lowtime_raw +KernelVersion: 3.18 +Contact: linux-...@vger.kernel.org +Description: + Raw value of time for output to be held high or low. diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index af3e76d..343e784 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -70,6 +70,7 @@ static const char * const iio_chan_type_name_spec[] = { [IIO_CCT] = "cct", [IIO_PRESSURE] = "pressure", [IIO_HUMIDITYRELATIVE] = "humidityrelative", + [IIO_WAVEFORM] = "waveform", }; static const char * const iio_modifier_names[] = { @@ -91,6 +92,8 @@ static const char * const iio_modifier_names[] = { [IIO_MOD_NORTH_TRUE] = "from_north_true", [IIO_MOD_NORTH_MAGN_TILT_COMP] = "from_north_magnetic_tilt_comp", [IIO_MOD_NORTH_TRUE_TILT_COMP] = "from_north_true_tilt_comp", + [IIO_MOD_HIGHTIME] = "hightime", + [IIO_MOD_LOWTIME] = "lowtime", }; /* relies on pairs of these shared then separate */ diff --git a/drivers/staging/iio/Documentation/iio_event_monitor.c b/drivers/staging/iio/Documentation/iio_event_monitor.c index 569d6f8..690f261 100644 --- a/drivers/staging/iio/Documentation/iio_event_monitor.c +++ b/drivers/staging/iio/Documentation/iio_event_monitor.c @@ -49,6 +49,7 @@ static const char * const iio_chan_type_name_spec[] = { [IIO_CCT] = "cct", [IIO_PRESSURE] = "pressure", [IIO_HUMIDITYRELATIVE] = "humidityrelative", + [IIO_WAVEFORM] = "waveform", }; static const char * const iio_ev_type_text[] = { @@ -108,6 +109,7 @@ static bool event_is_known(struct iio_event_data *event) case IIO_CCT: case IIO_PRESSURE: case IIO_HUMIDITYRELATIVE: + case IIO_WAVEFORM: break; default: return false; diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h index 4a2af8a..d3b0af1 100644 --- a/include/linux/iio/types.h +++ b/include/linux/iio/types.h @@ -30,6 +30,7 @@ enum iio_chan_type { IIO_CCT, IIO_PRESSURE, IIO_HUMIDITYRELATIVE, + IIO_WAVEFORM, }; enum iio_modifier { @@ -59,7 +60,9 @@ enum iio_modifier { IIO_MOD_NORTH_MAGN, IIO_MOD_NORTH_TRUE, IIO_MOD_NORTH_MAGN_TILT_COMP, - IIO_MOD_NORTH_TRUE_TILT_COMP + IIO_MOD_NORTH_TRUE_TILT_COMP, + IIO_MOD_HIGHTIME, + IIO_MOD_LOWTIME, }; enum iio_event_type { -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 4/9] staging: panel: Use defined value or checking module params state
On Wed, Nov 19, 2014 at 09:38:46PM +0100, Mariusz Gorski wrote: > Avoid magic number and use a comparison with a defined value instead > that checks whether module param has been set by the user to some > value at loading time. > > Signed-off-by: Mariusz Gorski > Acked-by: Willy Tarreau > --- > v2: Don't introduce new macros for param value check > > drivers/staging/panel/panel.c | 86 > +-- > 1 file changed, 43 insertions(+), 43 deletions(-) Ugh, I messed up here, and applied the first series, which was acked. Mariusz, can you resend the patches that I didn't apply, I can't seem to get the rest of these to work properly. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: rtl8188eu: core: rtw_wlan_util: replaced __inline with inline
On Thu, Nov 20, 2014 at 04:03:23PM +0100, Abel Moyo wrote: > Changed return type of function get_my_bssid from __inline to inline > > Signed-off-by: Abel Moyo > --- > drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c > b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c > index c495977..700c070 100644 > --- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c > +++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c > @@ -405,7 +405,7 @@ int get_bsstype(unsigned short capability) > return 0; > } > > -__inline u8 *get_my_bssid(struct wlan_bssid_ex *pnetwork) > +inline u8 *get_my_bssid(struct wlan_bssid_ex *pnetwork) I agree with Dan, just remove inline. Actually, just "open code" this by removing the function entirely, it's pointless. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:Staging:rtl8188eu:hal:usb_halinit.c: Added blank lines after declarations
On Sat, Nov 22, 2014 at 11:36:40AM +0530, Anjana Sasindran wrote: > This patch fixes the five checkpatch.pl warnings: > > WARNING:Missing a blank line after declaration > > Signed-off-by: Anjana Sasindran > --- > drivers/staging/rtl8188eu/hal/usb_halinit.c | 6 ++ > 1 file changed, 6 insertions(+) Why send 2 identical copies of this? Which to apply? How about neither, please resend it properly... ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:staging:wlan-ng: Fixed checkpatch warning
On Tue, Nov 25, 2014 at 05:16:40PM +0530, Athira Lekshmi C V wrote: > The following checkpatch warning was fixed > WARNING: line over 80 characters > > Signed-off-by: Athira Lekshmi C V > --- > drivers/staging/wlan-ng/prism2fw.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) Doesn't apply to my tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] iio: Add support for waveform output
On 11/26/2014 10:45 PM, George McCollister wrote: Output can be held high or low for a specified period of time. Support for waveform capture could be added in the future. That's a PWM device? ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: octeon: Fix checkpatch warning
On Wed, Nov 26, 2014 at 01:45:23PM -0800, Greg KH wrote: > On Tue, Nov 25, 2014 at 01:26:14PM +, Luis de Bethencourt wrote: > > This patch fixes the checkpatch.pl warnings: > > > > WARNING: line over 80 characters > > + int cores_in_use = core_state.baseline_cores - > > atomic_read(&core_state.available_cores); > > > > WARNING: line over 80 characters > > + skb->data = skb->head + work->packet_ptr.s.addr - > > cvmx_ptr_to_phys(skb->head); > > > > Signed-off-by: Luis de Bethencourt > > --- > > drivers/staging/octeon/ethernet-rx.c | 6 -- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/staging/octeon/ethernet-rx.c > > b/drivers/staging/octeon/ethernet-rx.c > > index 44e372f..bd83f55 100644 > > --- a/drivers/staging/octeon/ethernet-rx.c > > +++ b/drivers/staging/octeon/ethernet-rx.c > > @@ -295,7 +295,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, > > int budget) > > */ > > union cvmx_pow_wq_int_cntx counts; > > int backlog; > > - int cores_in_use = core_state.baseline_cores - > > atomic_read(&core_state.available_cores); > > + int cores_in_use = core_state.baseline_cores - > > + atomic_read(&core_state.available_cores); > > counts.u64 = > > cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group)); > > backlog = counts.s.iq_cnt + counts.s.ds_cnt; > > if (backlog > budget * cores_in_use && napi != NULL) > > @@ -324,7 +325,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, > > int budget) > > * buffer. > > */ > > if (likely(skb_in_hw)) { > > - skb->data = skb->head + work->packet_ptr.s.addr - > > cvmx_ptr_to_phys(skb->head); > > + skb->data = skb->head + work->packet_ptr.s.addr - > > + cvmx_ptr_to_phys(skb->head); > > prefetch(skb->data); > > skb->len = work->len; > > skb_set_tail_pointer(skb, skb->len); > > -- > > 2.1.3 > > No longer applies to my tree :( I'm confused. I just tried applying it to what I think is your tree is and it worked. https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/log/?h=staging-next Do I have this wrong? Sorry :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Wed, Nov 26, 2014 at 08:05:55AM -0800, Joe Perches wrote: > On Wed, 2014-11-26 at 15:42 +, Luis de Bethencourt wrote: > > On 26 November 2014 at 01:49, Joe Perches wrote: > [] > > > There is a script I posted a while back that > > > groups various checkpatch "types" together and > > > makes it a bit easier to do cleanup style > > > patches. > > > > > > https://lkml.org/lkml/2014/7/11/794 > > That is useful! I just run it on staging/octeon/ and it wrote two patches. > > Will submit them in a minute. > > Please make sure and write better commit messages > than the script produces. > Will do :) > > > Using checkpatch to get familiar with kernel > > > development is fine and all, but fixing actual > > > defects and submitting new code is way more > > > useful. > [] > > I agree. I was just using checkpatch to learn about the development process. > > How to create patches, submit patches, follow review, and such. Better to > > do it > > with small changes like this first. > > That's a good way to start. > > > Which makes me wonder. Is my patch accepted? Will it be merged? I can do the > > proposed logging macro additions in a few days. Not sure yet how the final > > step of the process when patches get accepted and merged works. > > You will generally get an email from a maintainer > when patches are accepted/rejected or you get > feedback asking for various changes. > > Greg KH does that for drivers/staging but not for > drivers/staging/media. Mauro Carvalho Chehab does. > > These emails are not immediate. It can take 2 or 3 > weeks for a response. Sometimes longer, sometimes > shorter, sometimes no response ever comes. > I understand. Busy people. > After a month or so, if you get no response, maybe > the maintainer never saw it. You should maybe > expand the cc: list for the email. > > When the patch is more than a trivial style cleanup, > Andrew Morton generally picks up orphan patches. > > For some subsystems, there are "tracking" mechanisms > like patchwork: > > For instance, netdev (net/ and drivers/net/) uses: > http://patchwork.ozlabs.org/project/netdev/list/ > and David Miller, the primary networking maintainer > is very prompt about updating it. > > There's this list of patchwork entries, but maintainer > activity of these lists vary: > > https://patchwork.kernel.org/ > Very interesting. I will follow the process through and learn on the way. Thanks Joe! ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/3] rtl8188eu: Remove leading spaces in rtw_led.c
On Fri, Nov 07, 2014 at 12:24:28AM +0100, Krzysztof Konopko wrote: > According to Linux coding convention leading spaces are not allowed. This > patch removes leading spaces in rtw_led.c > > Signed-off-by: Krzysztof Konopko > --- > drivers/staging/rtl8188eu/core/rtw_led.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8188eu/core/rtw_led.c > b/drivers/staging/rtl8188eu/core/rtw_led.c > index 1b8264b..5d7e8ec 100644 > --- a/drivers/staging/rtl8188eu/core/rtw_led.c > +++ b/drivers/staging/rtl8188eu/core/rtw_led.c > @@ -40,6 +40,7 @@ void BlinkTimerCallback(void *data) > void BlinkWorkItemCallback(struct work_struct *work) > { > struct LED_871x *pLed = container_of(work, struct LED_871x, > BlinkWorkItem); > + > BlinkHandler(pLed); > } This is not a "fix leading space" change :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:staging:comedi:drivers: Fixed checkpatch warning
On Wed, Nov 26, 2014 at 04:56:55PM +0530, Athira Lekshmi C V wrote: > Fixed the checkpatch warning: > WARNING: please, no space before tabs > > Signed-off-by: Athira Lekshmi C V Same question about the name here as before. Also, be more specific in your subject as to what you are changing. "fixed checkpatch warning" is very vague. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] hv: hv_fcopy: drop the obsolete message on transfer failure
On Tue, Nov 11, 2014 at 09:03:26PM -0800, Dexuan Cui wrote: > In the case the user-space daemon crashes, hangs or is killed, we > need to down the semaphore, otherwise, after the daemon starts next > time, the obsolete data in fcopy_transaction.message or > fcopy_transaction.fcopy_msg will be used immediately. > > Cc: K. Y. Srinivasan > Signed-off-by: Dexuan Cui > --- > drivers/hv/hv_fcopy.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c > index 23b2ce2..177122a 100644 > --- a/drivers/hv/hv_fcopy.c > +++ b/drivers/hv/hv_fcopy.c > @@ -86,6 +86,15 @@ static void fcopy_work_func(struct work_struct *dummy) >* process the pending transaction. >*/ > fcopy_respond_to_host(HV_E_FAIL); > + > + /* In the case the user-space daemon crashes, hangs or is killed, we > + * need to down the semaphore, otherwise, after the daemon starts next > + * time, the obsolete data in fcopy_transaction.message or > + * fcopy_transaction.fcopy_msg will be used immediately. > + */ > + if (down_trylock(&fcopy_transaction.read_sema)) > + pr_debug("FCP: failed to acquire the semaphore\n"); Why is "FCP:" needed? pr_debug() should never need any type of prefix. Please fix. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: octeon: Fix checkpatch warning
On Thu, Nov 27, 2014 at 12:35:23AM +, Luis de Bethencourt wrote: > On Wed, Nov 26, 2014 at 01:45:23PM -0800, Greg KH wrote: > > On Tue, Nov 25, 2014 at 01:26:14PM +, Luis de Bethencourt wrote: > > > This patch fixes the checkpatch.pl warnings: > > > > > > WARNING: line over 80 characters > > > + int cores_in_use = core_state.baseline_cores - > > > atomic_read(&core_state.available_cores); > > > > > > WARNING: line over 80 characters > > > + skb->data = skb->head + work->packet_ptr.s.addr - > > > cvmx_ptr_to_phys(skb->head); > > > > > > Signed-off-by: Luis de Bethencourt > > > --- > > > drivers/staging/octeon/ethernet-rx.c | 6 -- > > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/staging/octeon/ethernet-rx.c > > > b/drivers/staging/octeon/ethernet-rx.c > > > index 44e372f..bd83f55 100644 > > > --- a/drivers/staging/octeon/ethernet-rx.c > > > +++ b/drivers/staging/octeon/ethernet-rx.c > > > @@ -295,7 +295,8 @@ static int cvm_oct_napi_poll(struct napi_struct > > > *napi, int budget) > > >*/ > > > union cvmx_pow_wq_int_cntx counts; > > > int backlog; > > > - int cores_in_use = core_state.baseline_cores - > > > atomic_read(&core_state.available_cores); > > > + int cores_in_use = core_state.baseline_cores - > > > + atomic_read(&core_state.available_cores); > > > counts.u64 = > > > cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group)); > > > backlog = counts.s.iq_cnt + counts.s.ds_cnt; > > > if (backlog > budget * cores_in_use && napi != NULL) > > > @@ -324,7 +325,8 @@ static int cvm_oct_napi_poll(struct napi_struct > > > *napi, int budget) > > >* buffer. > > >*/ > > > if (likely(skb_in_hw)) { > > > - skb->data = skb->head + work->packet_ptr.s.addr - > > > cvmx_ptr_to_phys(skb->head); > > > + skb->data = skb->head + work->packet_ptr.s.addr - > > > + cvmx_ptr_to_phys(skb->head); > > > prefetch(skb->data); > > > skb->len = work->len; > > > skb_set_tail_pointer(skb, skb->len); > > > -- > > > 2.1.3 > > > > No longer applies to my tree :( > > I'm confused. > > I just tried applying it to what I think is your tree is and it worked. > https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/log/?h=staging-next > > Do I have this wrong? I'm applying patches first to staging-testing to get some 0-day buildbot testing before merging them to staging-next these days, as I've been burned with common problems too many times. I took some other octeon patches that were sent before yours were that caused the conflict. If you look at staging-testing right now you can see that. Hope this helps, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] mfd: rtsx: add func to split u32 into register
From: Micky Ching Add helper function to write u32 to registers, if we want to put u32 value to 4 continuous register, this can help us reduce tedious work. Signed-off-by: Micky Ching --- include/linux/mfd/rtsx_pci.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 74346d5..bf45ea2 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h @@ -967,4 +967,19 @@ static inline u8 *rtsx_pci_get_cmd_data(struct rtsx_pcr *pcr) return (u8 *)(pcr->host_cmds_ptr); } +static inline void rtsx_pci_write_be32(struct rtsx_pcr *pcr, u16 reg, u32 val) +{ + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg, 0xFF, val >> 24); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 1, 0xFF, val >> 16); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 2, 0xFF, val >> 8); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 3, 0xFF, val); +} + +static inline void rtsx_pci_write_le32(struct rtsx_pcr *pcr, u16 reg, u32 val) +{ + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg, 0xFF, val); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 1, 0xFF, val >> 8); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 2, 0xFF, val >> 16); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 3, 0xFF, val >> 24); +} #endif -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/2] mmc: rtsx: add support for sdio card
From: Micky Ching This patch is used to change transfer mode for sdio card support by SD interface. Micky Ching (2): mfd: rtsx: add func to split u32 into register mmc: rtsx: add support for sdio card drivers/mmc/host/rtsx_pci_sdmmc.c | 366 ++ include/linux/mfd/rtsx_pci.h | 15 ++ 2 files changed, 224 insertions(+), 157 deletions(-) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors
On Wed, Nov 26, 2014 at 02:52:22PM +0100, Vitaly Kuznetsov wrote: > When an SMP Hyper-V guest is running on top of 2012R2 Server and secondary > cpus are sent offline (with echo 0 > /sys/devices/system/cpu/cpu$cpu/online) > the system freeze is observed. This happens due to the fact that on newer > hypervisors (Win8, WS2012R2, ...) vmbus channel handlers are distributed > across all cpus (see init_vp_index() function in drivers/hv/channel_mgmt.c) > and on cpu offlining nobody reassigns them to CPU0. Prevent cpu offlining > when vmbus is loaded until the issue is fixed host-side. > > This patch also disables hibernation but it is OK as it is also broken (MCE > error is hit on resume). Suspend still works. > > Tested with WS2008R2 and WS2012R2. > > Signed-off-by: Vitaly Kuznetsov > --- > drivers/hv/vmbus_drv.c | 19 +++ > 1 file changed, 19 insertions(+) > > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c > index 4d6b269..9a82249 100644 > --- a/drivers/hv/vmbus_drv.c > +++ b/drivers/hv/vmbus_drv.c > @@ -32,6 +32,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -671,6 +672,13 @@ static void vmbus_isr(void) > tasklet_schedule(&msg_dpc); > } > > +#ifdef CONFIG_HOTPLUG_CPU > +static int hyperv_cpu_disable(void) > +{ > + return -1; > +} > +#endif > + > /* > * vmbus_bus_init -Main vmbus driver initialization routine. > * > @@ -711,6 +719,12 @@ static int vmbus_bus_init(int irq) > if (ret) > goto err_alloc; > > +#ifdef CONFIG_HOTPLUG_CPU > + if ((vmbus_proto_version != VERSION_WS2008) && > + (vmbus_proto_version != VERSION_WIN7)) > + smp_ops.cpu_disable = hyperv_cpu_disable; > +#endif > + > vmbus_request_offers(); > > return 0; > @@ -964,6 +978,11 @@ static void __exit vmbus_exit(void) > bus_unregister(&hv_bus); > hv_cleanup(); > acpi_bus_unregister_driver(&vmbus_acpi_driver); > +#ifdef CONFIG_HOTPLUG_CPU > + if ((vmbus_proto_version != VERSION_WS2008) && > + (vmbus_proto_version != VERSION_WIN7)) > + smp_ops.cpu_disable = native_cpu_disable; > +#endif > } #ifdef in a .c file is not a good idea to do if at all possible, please only put this in one place, using a function call to "hide" the mess. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] mmc: rtsx: add support for sdio card
From: Micky Ching Add support for sdio card by SD interface. The main change is data transfer mode, When read data, host wait data transfer while command start. When write data, host will start data transfer after command get response. The transfer mode modify can be applied both for SD/MMC card and sdio card. Signed-off-by: Micky Ching --- drivers/mmc/host/rtsx_pci_sdmmc.c | 366 ++ 1 file changed, 209 insertions(+), 157 deletions(-) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index c70b602..a4f62e4 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -71,30 +72,82 @@ static inline void sd_clear_error(struct realtek_pci_sdmmc *host) } #ifdef DEBUG -static void sd_print_debug_regs(struct realtek_pci_sdmmc *host) +static void dump_reg_range(struct realtek_pci_sdmmc *host, u16 start, u16 end) { - struct rtsx_pcr *pcr = host->pcr; - u16 i; - u8 *ptr; + u16 len = end - start + 1; + int i; + u8 *data = kzalloc(8, GFP_KERNEL); - /* Print SD host internal registers */ - rtsx_pci_init_cmd(pcr); - for (i = 0xFDA0; i <= 0xFDAE; i++) - rtsx_pci_add_cmd(pcr, READ_REG_CMD, i, 0, 0); - for (i = 0xFD52; i <= 0xFD69; i++) - rtsx_pci_add_cmd(pcr, READ_REG_CMD, i, 0, 0); - rtsx_pci_send_cmd(pcr, 100); - - ptr = rtsx_pci_get_cmd_data(pcr); - for (i = 0xFDA0; i <= 0xFDAE; i++) - dev_dbg(sdmmc_dev(host), "0x%04X: 0x%02x\n", i, *(ptr++)); - for (i = 0xFD52; i <= 0xFD69; i++) - dev_dbg(sdmmc_dev(host), "0x%04X: 0x%02x\n", i, *(ptr++)); + if (!data) + return; + + for (i = 0; i < len; i += 8, start += 8) { + int j, n = min(8, len - i); + + for (j = 0; j < n; j++) + rtsx_pci_read_register(host->pcr, start + j, data + j); + dev_dbg(sdmmc_dev(host), "0x%04X(%d): %8ph\n", start, n, data); + } + + kfree(data); +} + +static void sd_print_debug_regs(struct realtek_pci_sdmmc *host) +{ + dump_reg_range(host, 0xFDA0, 0xFDB3); + dump_reg_range(host, 0xFD52, 0xFD69); } #else #define sd_print_debug_regs(host) #endif /* DEBUG */ +static int sdmmc_get_cd(struct mmc_host *mmc); +static void sd_send_cmd_get_rsp(struct realtek_pci_sdmmc *host, + struct mmc_command *cmd); + +static void sd_cmd_set_sd_cmd(struct rtsx_pcr *pcr, struct mmc_command *cmd) +{ + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CMD0, 0xFF, 0x40 | cmd->opcode); + rtsx_pci_write_be32(pcr, SD_CMD1, cmd->arg); +} + +static void sd_cmd_set_data_len(struct rtsx_pcr *pcr, u16 blocks, u16 blksz) +{ + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_BLOCK_CNT_L, 0xFF, blocks); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_BLOCK_CNT_H, 0xFF, blocks >> 8); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_BYTE_CNT_L, 0xFF, blksz); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_BYTE_CNT_H, 0xFF, blksz >> 8); +} + +static int sd_response_type(struct mmc_command *cmd) +{ + switch (mmc_resp_type(cmd)) { + case MMC_RSP_NONE: + return SD_RSP_TYPE_R0; + case MMC_RSP_R1: + return SD_RSP_TYPE_R1; + case MMC_RSP_R1 & ~MMC_RSP_CRC: + return SD_RSP_TYPE_R1 | SD_NO_CHECK_CRC7; + case MMC_RSP_R1B: + return SD_RSP_TYPE_R1b; + case MMC_RSP_R2: + return SD_RSP_TYPE_R2; + case MMC_RSP_R3: + return SD_RSP_TYPE_R3; + default: + return -EINVAL; + } +} + +static int sd_status_index(int resp_type) +{ + if (resp_type == SD_RSP_TYPE_R0) + return 0; + else if (resp_type == SD_RSP_TYPE_R2) + return 16; + + return 5; +} /* * sd_pre_dma_transfer - do dma_map_sg() or using cookie * @@ -166,34 +219,27 @@ static void sdmmc_post_req(struct mmc_host *mmc, struct mmc_request *mrq, data->host_cookie = 0; } -static int sd_read_data(struct realtek_pci_sdmmc *host, u8 *cmd, u16 byte_cnt, - u8 *buf, int buf_len, int timeout) +static int sd_read_data(struct realtek_pci_sdmmc *host, struct mmc_command *cmd, + u16 byte_cnt, u8 *buf, int buf_len, int timeout) { struct rtsx_pcr *pcr = host->pcr; - int err, i; + int err; u8 trans_mode; - dev_dbg(sdmmc_dev(host), "%s: SD/MMC CMD%d\n", __func__, cmd[0] - 0x40); + dev_dbg(sdmmc_dev(host), "%s: SD/MMC CMD %d, arg = 0x%08x\n", + __func__, cmd->opcode, cmd->arg); if (!buf) buf_len = 0; - if ((cmd[0] & 0x3F) == MMC_SEND_TUNING_BLOCK) + if (cmd->opcode == MMC_SEND_TUNING_BLOCK) trans_mode = SD_TM_AUTO_TUNING; else trans_mode = SD_TM_NORMAL_RE
RE: [PATCH] Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors
> -Original Message- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > Behalf Of Greg Kroah-Hartman > Sent: Thursday, November 27, 2014 11:03 AM > To: Vitaly Kuznetsov > Cc: de...@linuxdriverproject.org; Haiyang Zhang; linux- > ker...@vger.kernel.org > Subject: Re: [PATCH] Drivers: hv: vmbus: prevent cpu offlining on newer > hypervisors > > On Wed, Nov 26, 2014 at 02:52:22PM +0100, Vitaly Kuznetsov wrote: > > When an SMP Hyper-V guest is running on top of 2012R2 Server and > secondary > > cpus are sent offline (with echo 0 > > /sys/devices/system/cpu/cpu$cpu/online) > > the system freeze is observed. This happens due to the fact that on newer > > hypervisors (Win8, WS2012R2, ...) vmbus channel handlers are > distributed > > across all cpus (see init_vp_index() function in > drivers/hv/channel_mgmt.c) > > and on cpu offlining nobody reassigns them to CPU0. Prevent cpu > offlining > > when vmbus is loaded until the issue is fixed host-side. > > > > This patch also disables hibernation but it is OK as it is also broken (MCE > > error is hit on resume). Suspend still works. > > > > Tested with WS2008R2 and WS2012R2. > > > > Signed-off-by: Vitaly Kuznetsov > > --- > > drivers/hv/vmbus_drv.c | 19 +++ > > 1 file changed, 19 insertions(+) > > > > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c > > index 4d6b269..9a82249 100644 > > --- a/drivers/hv/vmbus_drv.c > > +++ b/drivers/hv/vmbus_drv.c > > @@ -32,6 +32,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -671,6 +672,13 @@ static void vmbus_isr(void) > > tasklet_schedule(&msg_dpc); > > } > > > > +#ifdef CONFIG_HOTPLUG_CPU > > +static int hyperv_cpu_disable(void) > > +{ > > + return -1; > > +} > > +#endif > > + > > /* > > * vmbus_bus_init -Main vmbus driver initialization routine. > > * > > @@ -711,6 +719,12 @@ static int vmbus_bus_init(int irq) > > if (ret) > > goto err_alloc; > > > > +#ifdef CONFIG_HOTPLUG_CPU > > + if ((vmbus_proto_version != VERSION_WS2008) && > > + (vmbus_proto_version != VERSION_WIN7)) > > + smp_ops.cpu_disable = hyperv_cpu_disable; > > +#endif > > + > > vmbus_request_offers(); > > > > return 0; > > @@ -964,6 +978,11 @@ static void __exit vmbus_exit(void) > > bus_unregister(&hv_bus); > > hv_cleanup(); > > acpi_bus_unregister_driver(&vmbus_acpi_driver); > > +#ifdef CONFIG_HOTPLUG_CPU > > + if ((vmbus_proto_version != VERSION_WS2008) && > > + (vmbus_proto_version != VERSION_WIN7)) > > + smp_ops.cpu_disable = native_cpu_disable; > > +#endif > > } > > #ifdef in a .c file is not a good idea to do if at all possible, please > only put this in one place, using a function call to "hide" the mess. > > greg k-h Hi Vitaly, The idea of the patch is good to me. I agree with Greg. BTW, maybe hv_cpu_hotplug_quirk() is a better name? Thanks, -- Dexuan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: lustre: fix sparse warnings related to lock context imbalance
On Wed, Nov 26, 2014 at 12:54:43PM -0800, Greg KH wrote: > > Ugh, how horrid, please just delete these functions and push down the > spin_lock/unlock calls down into the places these are called. > > Same for these. > > Same thing here. Hello Greg, Thanks for your comments, I will write a v2. -- Cheers, Loic ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH] hv: hv_fcopy: drop the obsolete message on transfer failure
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Thursday, November 27, 2014 7:54 AM > To: Dexuan Cui > Cc: linux-ker...@vger.kernel.org; driverdev-devel@linuxdriverproject.org; > o...@aepfle.de; a...@canonical.com; jasow...@redhat.com; KY Srinivasan; > Haiyang Zhang; vkuzn...@redhat.com > Subject: Re: [PATCH] hv: hv_fcopy: drop the obsolete message on transfer > failure > > On Tue, Nov 11, 2014 at 09:03:26PM -0800, Dexuan Cui wrote: > > In the case the user-space daemon crashes, hangs or is killed, we > > need to down the semaphore, otherwise, after the daemon starts next > > time, the obsolete data in fcopy_transaction.message or > > fcopy_transaction.fcopy_msg will be used immediately. > > > > Cc: K. Y. Srinivasan > > Signed-off-by: Dexuan Cui > > --- > > drivers/hv/hv_fcopy.c | 9 + > > 1 file changed, 9 insertions(+) > > > > diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c > > index 23b2ce2..177122a 100644 > > --- a/drivers/hv/hv_fcopy.c > > +++ b/drivers/hv/hv_fcopy.c > > @@ -86,6 +86,15 @@ static void fcopy_work_func(struct work_struct > *dummy) > > * process the pending transaction. > > */ > > fcopy_respond_to_host(HV_E_FAIL); > > + > > + /* In the case the user-space daemon crashes, hangs or is killed, we > > +* need to down the semaphore, otherwise, after the daemon starts > next > > +* time, the obsolete data in fcopy_transaction.message or > > +* fcopy_transaction.fcopy_msg will be used immediately. > > +*/ > > + if (down_trylock(&fcopy_transaction.read_sema)) > > + pr_debug("FCP: failed to acquire the semaphore\n"); > > Why is "FCP:" needed? pr_debug() should never need any type of prefix. > > Please fix. > > thanks, > > greg k-h Ok, I'll send a v2 soon. Thanks, -- Dexuan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] hv: hv_fcopy: drop the obsolete message on transfer failure
In the case the user-space daemon crashes, hangs or is killed, we need to down the semaphore, otherwise, after the daemon starts next time, the obsolete data in fcopy_transaction.message or fcopy_transaction.fcopy_msg will be used immediately. Reviewed-by: Vitaly Kuznetsov Cc: K. Y. Srinivasan Signed-off-by: Dexuan Cui --- v2: I removed the "FCP" prefix as Greg asked. I also updated the output message a little: "FCP: failed to acquire the semaphore" --> "can not acquire the semaphore: it is benign" drivers/hv/hv_fcopy.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c index 23b2ce2..c518ad9 100644 --- a/drivers/hv/hv_fcopy.c +++ b/drivers/hv/hv_fcopy.c @@ -86,6 +86,15 @@ static void fcopy_work_func(struct work_struct *dummy) * process the pending transaction. */ fcopy_respond_to_host(HV_E_FAIL); + + /* In the case the user-space daemon crashes, hangs or is killed, we +* need to down the semaphore, otherwise, after the daemon starts next +* time, the obsolete data in fcopy_transaction.message or +* fcopy_transaction.fcopy_msg will be used immediately. +*/ + if (down_trylock(&fcopy_transaction.read_sema)) + pr_debug("can not acquire the semaphore: it is benign\n"); + } static int fcopy_handle_handshake(u32 version) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] hv: hv_fcopy: drop the obsolete message on transfer failure
- Original Message - > In the case the user-space daemon crashes, hangs or is killed, we > need to down the semaphore, otherwise, after the daemon starts next > time, the obsolete data in fcopy_transaction.message or > fcopy_transaction.fcopy_msg will be used immediately. > > Reviewed-by: Vitaly Kuznetsov > Cc: K. Y. Srinivasan > Signed-off-by: Dexuan Cui > --- > > v2: I removed the "FCP" prefix as Greg asked. > > I also updated the output message a little: > "FCP: failed to acquire the semaphore" --> > "can not acquire the semaphore: it is benign" > > drivers/hv/hv_fcopy.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c > index 23b2ce2..c518ad9 100644 > --- a/drivers/hv/hv_fcopy.c > +++ b/drivers/hv/hv_fcopy.c > @@ -86,6 +86,15 @@ static void fcopy_work_func(struct work_struct *dummy) >* process the pending transaction. >*/ > fcopy_respond_to_host(HV_E_FAIL); > + > + /* In the case the user-space daemon crashes, hangs or is killed, we > + * need to down the semaphore, otherwise, after the daemon starts next > + * time, the obsolete data in fcopy_transaction.message or > + * fcopy_transaction.fcopy_msg will be used immediately. > + */ Looks still racy, what happens if the daemon start before down_trylock() but after fcopy_respont_to_host() here? > + if (down_trylock(&fcopy_transaction.read_sema)) > + pr_debug("can not acquire the semaphore: it is benign\n"); typo > + > } > > static int fcopy_handle_handshake(u32 version) > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel