Skip to content

merge of v5.10.51 into rpi-5.10.y conflict #4462

Closed
@ncopa

Description

@ncopa

Is this the right place for my bug report?
I am not sure. I am trying share my finding while preparing the 5.10.51 kernel for alpine linux.

Describe the bug
Merge conflict in drivers/gpu/drm/vc4/vc4_hdmi.c

To reproduce

git checkout rpi-5.10.y
git branch -b wip
git merge v5.10.51

Expected behaviour
well.... conflicts are not really unexpected.

Actual behaviour

CONFLICT (content): Merge conflict in drivers/gpu/drm/vc4/vc4_hdmi.c

there was two hunks that had conflicts:

static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,
                                                struct drm_atomic_state *state)
{
        struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
        struct drm_connector *connector = &vc4_hdmi->connector;
        struct drm_connector_state *conn_state =
                drm_atomic_get_new_connector_state(state, connector);
        struct vc4_hdmi_connector_state *vc4_conn_state =
                conn_state_to_vc4_hdmi_conn_state(conn_state);
        struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;
        unsigned long bvb_rate, pixel_rate, hsm_rate;
        int ret;

        ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev);
<<<<<<< HEAD
        if (ret) {
=======
        if (ret < 0) {
>>>>>>> v5.10.51
                DRM_ERROR("Failed to retain power domain: %d\n", ret);
                pm_runtime_put(&vc4_hdmi->pdev->dev);
                return;
        }

and

static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
...
        /*
         * We need to have the device powered up at this point to call
         * our reset hook and for the CEC init.
         */
        ret = vc4_hdmi_runtime_resume(dev);
        if (ret)
                goto err_put_ddc;

        pm_runtime_get_noresume(dev);
        pm_runtime_set_active(dev);
        pm_runtime_enable(dev);

        if (vc4_hdmi->variant->reset)
                vc4_hdmi->variant->reset(vc4_hdmi);

        if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") ||
             of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi1")) &&
            HDMI_READ(HDMI_VID_CTL) & VC4_HD_VID_CTL_ENABLE) {
                clk_prepare_enable(vc4_hdmi->pixel_clock);
                clk_prepare_enable(vc4_hdmi->hsm_clock);
                clk_prepare_enable(vc4_hdmi->pixel_bvb_clock);
        }
<<<<<<< HEAD
=======

        pm_runtime_enable(dev);
>>>>>>> v5.10.51

        drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS);
        drm_encoder_helper_add(encoder, &vc4_hdmi_encoder_helper_funcs);

System
n/a

Logs
n/a

Additional context

The following comits from rpi-5.10.y:

  • a2224f9 (drm/vc4: hdmi: Switch to pm_runtime_resume_and_get)
  • 085260e (drm/vc4: hdmi: Put the device on error in pre_crtc_configure)

conflicts with upstream linux-5.10.y:


And the rpi-5.10.y commit

  • 94bc403 (drm/vc4: hdmi: Make sure the controller is powered up during bind)

conflicts with upstream linux-5.10.y

The way I chose to solve this was to follow upstream for the first conflict

        if (ret < 0) {

and in the second I followed HEAD/rpi-5.10.y and removed the pm_runtime_enable(dev); as it was moved up in 94bc403. I don't know if this was correct resolution, since I am not familiar with the code.

Issue #4457 might also be related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions